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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 214803002: Making SkDeferredCanvas::silentFlush trigger a skippedPendingDrawCommands callback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 2c5e5301c01741e0c57815f3ebecda4b4f6cd6a3..4836cd7be4dd8ab483eb34974b091a34391f2e8f 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -324,9 +324,6 @@ void SkDeferredDevice::skipPendingCommands() {
if (fPipeController.hasPendingCommands()) {
fFreshFrame = true;
flushPendingCommands(kSilent_PlaybackMode);
- if (fNotificationClient) {
- fNotificationClient->skippedPendingDrawCommands();
- }
}
}
}
@@ -363,9 +360,14 @@ void SkDeferredDevice::flushPendingCommands(PlaybackMode playbackMode) {
}
fPipeWriter.flushRecording(true);
fPipeController.playback(kSilent_PlaybackMode == playbackMode);
- if (playbackMode == kNormal_PlaybackMode && fNotificationClient) {
- fNotificationClient->flushedDrawCommands();
+ if (fNotificationClient) {
+ if (playbackMode == kSilent_PlaybackMode) {
+ fNotificationClient->skippedPendingDrawCommands();
+ } else {
+ fNotificationClient->flushedDrawCommands();
+ }
}
+
fPreviousStorageAllocated = storageAllocatedForRecording();
}
« 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