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

Unified Diff: src/image/SkSurface_Raster.cpp

Issue 1266143003: lock pixels in image when bitmap is immutable and not-lazy (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/SkSurface_Raster.cpp
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index d0a65530f071568d18a0e85b95afbb1ad4caa0ba..bcf6da7d1820b1230d94db8071aeeab8c4299dd1 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -128,7 +128,7 @@ SkImage* SkSurface_Raster::onNewImageSnapshot(Budgeted) {
}
// Our pixels are in memory, so read access on the snapshot SkImage could be cheap.
// Lock the shared pixel ref to ensure peekPixels() is usable.
- return SkNewImageFromRasterBitmap(fBitmap, &this->props(), kLocked_SharedPixelRefMode,
+ return SkNewImageFromRasterBitmap(fBitmap, &this->props(),
fWeOwnThePixels ? kNo_ForceCopyMode : kYes_ForceCopyMode);
}

Powered by Google App Engine
This is Rietveld 408576698