aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoseph Wen <josephwen@google.com>2010-09-19 21:04:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-19 21:04:01 -0700
commitc1013783487ed82bf5d4c6f2d2366bb9c4372725 (patch)
treeb09cd16861cf69eb8b470e0c7a98b1b5a35d3ec1 /include
parent60bc5886923d64c50292cbc51499aecc5468489a (diff)
parent2ff9c8dd5defefc240f1b871a6927cb4352c0077 (diff)
downloadexternal_skia-c1013783487ed82bf5d4c6f2d2366bb9c4372725.zip
external_skia-c1013783487ed82bf5d4c6f2d2366bb9c4372725.tar.gz
external_skia-c1013783487ed82bf5d4c6f2d2366bb9c4372725.tar.bz2
am 2ff9c8dd: am 58971879: Add the tile-based decoding capability to the PNG decoder.
Merge commit '2ff9c8dd5defefc240f1b871a6927cb4352c0077' * commit '2ff9c8dd5defefc240f1b871a6927cb4352c0077': Add the tile-based decoding capability to the PNG decoder.
Diffstat (limited to 'include')
-rw-r--r--include/images/SkImageDecoder.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/images/SkImageDecoder.h b/include/images/SkImageDecoder.h
index 767a09a..3bb287d 100644
--- a/include/images/SkImageDecoder.h
+++ b/include/images/SkImageDecoder.h
@@ -216,7 +216,6 @@ public:
virtual bool decodeRegion(SkBitmap* bitmap, SkIRect rect,
SkBitmap::Config pref);
-
/** Given a stream, this will try to find an appropriate decoder object.
If none is found, the method returns NULL.
*/
@@ -318,6 +317,26 @@ protected:
return false;
}
+ /*
+ * Crop a rectangle from the src Bitmap to the dest Bitmap. src and dest are
+ * both sampled by sampleSize from an original Bitmap.
+ *
+ * @param dest the destination Bitmap.
+ * @param src the source Bitmap that is sampled by sampleSize from the original
+ * Bitmap.
+ * @param sampleSize the sample size that src is sampled from the original Bitmap.
+ * @param (srcX, srcY) the upper-left point of the src Btimap in terms of
+ * the coordinate in the original Bitmap.
+ * @param (width, height) the width and height of the unsampled dest.
+ * @param (destX, destY) the upper-left point of the dest Bitmap in terms of
+ * the coordinate in the original Bitmap.
+ */
+ virtual void cropBitmap(SkBitmap *dest, SkBitmap *src, int sampleSize,
+ int destX, int destY, int width, int height,
+ int srcX, int srcY);
+
+
+
/** Can be queried from within onDecode, to see if the user (possibly in
a different thread) has requested the decode to cancel. If this returns
true, your onDecode() should stop and return false.