aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-13 20:17:58 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-13 20:17:58 +0000
commitdd9ea9262cb61b545fcf414fbde677eb2b62fee4 (patch)
tree8126f1aaf7b1a14e900d6245fbc3aca1d9a0f523 /include/core/SkBitmap.h
parenta8582234080b01f042b16af4f2c7461193c2cc82 (diff)
add SkBitmap::installPixelRef()
BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/129423002 git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r--include/core/SkBitmap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b8117bd76f..1cb4fd7f35 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -268,6 +268,16 @@ public:
*/
void setPixels(void* p, SkColorTable* ctable = NULL);
+ /**
+ * Install the specified pixelref into the bitmap, with an optional rect
+ * for referencing a subset of the pixels in the pixelref. This sets the
+ * config/width/height/alphatype of the bitmap to match the pixelref.
+ *
+ * The subset rect, if not null, is intersected with the bounds of the
+ * pixelref (taken from its SkImageInfo).
+ */
+ SkPixelRef* installPixelRef(SkPixelRef*, const SkIRect* subset = NULL);
+
/** Copies the bitmap's pixels to the location pointed at by dst and returns
true if possible, returns false otherwise.