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

Unified Diff: src/image/SkImagePriv.h

Issue 1254383006: SkImage_Raster's pixels are always immutable. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
Index: src/image/SkImagePriv.h
diff --git a/src/image/SkImagePriv.h b/src/image/SkImagePriv.h
index 876c4279b6ebaca031ad190a82b59dc41421f8f7..0626d6a3ce72348934e52cab3f5e1d620a0a9f33 100644
--- a/src/image/SkImagePriv.h
+++ b/src/image/SkImagePriv.h
@@ -39,8 +39,12 @@ enum SharedPixelRefMode {
kLocked_SharedPixelRefMode,
kUnlocked_SharedPixelRefMode
};
-extern SkImage* SkNewImageFromRasterBitmap(const SkBitmap&, bool forceSharePixelRef,
- const SkSurfaceProps*, SharedPixelRefMode);
+enum ForceCopyMode {
+ kNo_ForceCopyMode,
+ kYes_ForceCopyMode, // must copy the pixels even if the bitmap is immutable
+};
+extern SkImage* SkNewImageFromRasterBitmap(const SkBitmap&, const SkSurfaceProps*,
+ SharedPixelRefMode, ForceCopyMode = kNo_ForceCopyMode);
static inline size_t SkImageMinRowBytes(const SkImageInfo& info) {
size_t minRB = info.minRowBytes();

Powered by Google App Engine
This is Rietveld 408576698