Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: include/core/SkBitmap.h

Issue 129423002: add SkBitmap::installPixelRef() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkImageInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b8117bd76f3ea0d7efe67987177cbd877d0a5279..1cb4fd7f354316a39c5e82eb349c8d1f50b28b32 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.
« no previous file with comments | « no previous file | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698