Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As @hackbod mentioned <code>BitmapRegionDecoder</code> is based on external <code>skia</code> library. Yet it's may be a benefit.</p> <p>Let's examine original source:</p> <ul> <li><p><code>BitmapRegionDecoder.java</code>. Mostly defines wrappers around native methods:</p> <pre><code>private static native Bitmap nativeDecodeRegion(int lbm, int start_x, int start_y, int width, int height, BitmapFactory.Options options); private static native int nativeGetWidth(int lbm); private static native int nativeGetHeight(int lbm); private static native void nativeClean(int lbm); // ...multiply nativeNewInstance overloads follow </code></pre> <p>Class doesn't use any new Java APIs we'd need to backport.</p></li> <li><p><code>BitmapRegionDecoder.cpp</code>. Header files it includes consist of ones which are present in <code>Froyo</code> except these two:</p> <ul> <li><p><code>AutoDecodeCancel.h</code>. The only line it's used in:</p> <pre><code>AutoDecoderCancel adc(options, decoder); </code></pre> <p>This class handles <code>SkDecoder</code> instances lifecycle. It's a small piece of code and may be well back-ported.</p></li> <li><p><code>SkBitmapRegionDecoder.h</code></p> <p>As filename states this is a core component. In fact, all previous were a kind of wrappers around it. The good news is that we may not need to back-port it as it should be possible to take a whole <code>skia</code> library from the <code>Gingerbeard</code> and compile it under <code>Froyo</code> as it is external and doesn't contain any new dependencies.</p></li> </ul></li> </ul> <p>P.S. I didn't actually dive deep in the code so please correct me if there's anything I overlooked.</p> <h3>Update:</h3> <p>Source code we need is located in following repositories on branches <code>froyo-release</code> and <code>gingerbread-mr4-release</code>:</p> <ul> <li><a href="https://github.com/android/platform_external_skia" rel="noreferrer">External skia library repository</a> <ul> <li>Header files are in <code>include/core</code> and <code>include/images</code></li> </ul></li> <li><a href="https://github.com/android/platform_frameworks_base" rel="noreferrer">Android framework base</a> <ul> <li>Java code: <code>graphics/java/android/graphics/BitmapRegionDecoder.java</code></li> <li>Native code: <code>core/jni/android/graphics/...</code></li> </ul></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload