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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 939103002: Do not playback existing commands for full deferred canvas writePixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 9 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/DeferredCanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 8fe9f8a4b59e5651fa3f057b42978fd9ef220fca..b95c040fff79c70f323d88a5c894e880142b820c 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -445,11 +445,11 @@ bool SkDeferredDevice::onWritePixels(const SkImageInfo& info, const void* pixels
SkASSERT(x + info.width() <= width());
SkASSERT(y + info.height() <= height());
- this->flushPendingCommands(kNormal_PlaybackMode);
-
const SkImageInfo deviceInfo = this->imageInfo();
if (info.width() == deviceInfo.width() && info.height() == deviceInfo.height()) {
this->skipPendingCommands();
+ } else {
+ this->flushPendingCommands(kNormal_PlaybackMode);
}
this->prepareForImmediatePixelWrite();
« no previous file with comments | « no previous file | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698