diff options
author | reed <reed@chromium.org> | 2015-07-30 20:13:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-30 20:13:43 -0700 |
commit | 02d91d187324cd0f014a78eab1ca09ec71a9b356 (patch) | |
tree | c085e690e185f22732146c4ce4837230a6e1e3a5 /src/image/SkSurface_Raster.cpp | |
parent | 4ed3dd613e03ff2188c5061d07e9502cf040a2b1 (diff) |
lock pixels in image when bitmap is immutable and not-lazy
BUG=skia:
Review URL: https://codereview.chromium.org/1266143003
Diffstat (limited to 'src/image/SkSurface_Raster.cpp')
-rw-r--r-- | src/image/SkSurface_Raster.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index d0a65530f0..bcf6da7d18 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); } |