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

Unified Diff: src/core/SkCanvas.cpp

Issue 352573005: writepixels needs to bump genID (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | tests/WritePixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index ec98b7e3e63c3059f4d1983ec4ac107cb1193fa1..2fb5c951249d54c1905107e0a1c6161e1461281a 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -753,6 +753,9 @@ bool SkCanvas::writePixels(const SkImageInfo& origInfo, const void* pixels, size
// here x,y are either 0 or negative
pixels = ((const char*)pixels - y * rowBytes - x * info.bytesPerPixel());
+ // Tell our owning surface to bump its generation ID
+ this->predrawNotify();
+
// The device can assert that the requested area is always contained in its bounds
return device->writePixels(info, pixels, rowBytes, target.x(), target.y());
}
« no previous file with comments | « no previous file | tests/WritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698