title: Android Canvas hardware acceleration
body: <p>Upon the link </p>
  
  <p><a href="http://developer.android.com/guide/topics/graphics/hardware-accel.html" rel="nofollow">Hardware accleration</a></p>
  
  <p>I found that Canvas now supports hardware acceleration(mostly).</p>
  
  <p>I downloaded the 4.2.2 AOSP(API Level 17) source and checked the code in external/skia/src/core/sKCanvas.cpp</p>
  
  <p>I reached sKCanvas.cpp because this will finally get called via jni from Android Canvas class.</p>
  
  <p>However, say drawPosText(), this function should be using hardware acceleration (open gl)</p>
  
  <p>in the code. But when I checked this function in sKCanvas.cpp, I dont see any code related to open gl. </p>
  
  <p>Did I misunderstand anything? This does confuse me.</p>
  
  <p>Thanks.</p>
  
  <pre><code>void SkCanvas::drawPosText(const void* text, size_t byteLength,
                         const SkPoint pos[], const SkPaint&amp; paint) {
  LOOPER_BEGIN(paint, SkDrawFilter::kText_Type)
  
  while (iter.next()) {
      SkDeviceFilteredPaint dfp(iter.fDevice, looper.paint());
      iter.fDevice-&gt;drawPosText(iter, text, byteLength, &amp;pos-&gt;fX, 0, 2,
                                dfp.paint());
  }
  
  LOOPER_END
  </code></pre>
  
  <p>}</p>