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

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 1162203005: clarify that accessPixels is for write-access, and peekPixels is RO (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « include/core/SkDevice.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapDevice.cpp
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 2a805cbf02bd1e77b081fd14d2e0a5f0f324924f..343bbc8893a814a4dec83ea4375ec7a9671c80bb 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -126,7 +126,11 @@ const SkBitmap& SkBitmapDevice::onAccessBitmap() {
}
bool SkBitmapDevice::onAccessPixels(SkPixmap* pmap) {
- return fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap);
+ if (fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap)) {
+ fBitmap.notifyPixelsChanged();
+ return true;
+ }
+ return false;
}
bool SkBitmapDevice::onPeekPixels(SkPixmap* pmap) {
« no previous file with comments | « include/core/SkDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698