aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoseph Wen <josephwen@google.com>2010-08-24 16:55:45 +0800
committerWei-Ta Chen <weita@google.com>2010-09-20 11:16:31 +0800
commit58971879258a502a7568fbad0e6852e78c3eca3c (patch)
tree88c2a884dbcbc9a42b7407bb865c8950a7daef7d /include
parent3a1cc9700bf928ed3b1e05c7edc543124440c54c (diff)
downloadexternal_skia-58971879258a502a7568fbad0e6852e78c3eca3c.zip
external_skia-58971879258a502a7568fbad0e6852e78c3eca3c.tar.gz
external_skia-58971879258a502a7568fbad0e6852e78c3eca3c.tar.bz2
Add the tile-based decoding capability to the PNG decoder.
Change-Id: Ie506dbf914cca9ad8a55747657abbe2a245ef217
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.