diff options
author | 2014-03-27 15:48:52 +0000 | |
---|---|---|
committer | 2014-03-27 15:48:52 +0000 | |
commit | dad009be4ae15cae7b1ae9cecdf816a21bb7c5f9 (patch) | |
tree | c30a25b3ba91635413002c5fe63114af68515adb /src/utils | |
parent | 7669a77cd16fbab3618ca1f1a03bcfa05a93c447 (diff) |
Making SkDeferredCanvas::silentFlush trigger a skippedPendingDrawCommands callback
The bug was preventing Canvas2DLayerBridge from properly tracking changes
in memory consumption that were triggered by calls to silentFlush.
BUG=344666
TEST=DeferredCanvas unit test
R=senorblanco@google.com, senorblanco@chromium.org
Author: junov@chromium.org
Review URL: https://codereview.chromium.org/214803002
git-svn-id: http://skia.googlecode.com/svn/trunk@13965 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkDeferredCanvas.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp index 2c5e5301c0..4836cd7be4 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(); } |