From fb10389403cf1cc771e103016207fde84c5f4825 Mon Sep 17 00:00:00 2001 From: "junov@chromium.org" Date: Thu, 20 Sep 2012 19:35:43 +0000 Subject: Adding a silent playback option to SkGPipeRead Testing state consistency after silent playback in CanvasTest indirectly through SkDeferredCanvas. BUG=http://code.google.com/p/chromium/issues/detail?id=146178 TEST=CanvasTest unit test, and bench with --mode deferredSilent Review URL: https://codereview.appspot.com/6542047 git-svn-id: http://skia.googlecode.com/svn/trunk@5619 2bbb7eff-a529-9590-31e7-b0007b416f81 --- experimental/Debugger/DebuggerContentView.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'experimental') diff --git a/experimental/Debugger/DebuggerContentView.cpp b/experimental/Debugger/DebuggerContentView.cpp index 8039e57faa..f079508643 100644 --- a/experimental/Debugger/DebuggerContentView.cpp +++ b/experimental/Debugger/DebuggerContentView.cpp @@ -40,10 +40,9 @@ public: int frameBound = 0; size_t bytesRead; while (static_cast(offset) < size) { - SkGPipeReader::Status s = dumpReader->playback(data + offset, - size - offset, - &bytesRead, - true); + SkGPipeReader::Status s = + dumpReader->playback(data + offset, size - offset, + SkGPipeReader::kReadAtom_PlaybackFlag, &bytesRead); SkASSERT(SkGPipeReader::kError_Status != s); offset += bytesRead; @@ -138,9 +137,9 @@ protected: SkGPipeReader::Status s; //Read the first chunk if (offset < firstChunk && firstChunk < toBeRead) { - s = dumpReader->playback(fData.begin() + offset, firstChunk - offset, NULL, false); + s = dumpReader->playback(fData.begin() + offset, firstChunk - offset); SkASSERT(SkGPipeReader::kError_Status != s); - s = reader->playback(fData.begin() + offset, firstChunk - offset, &bytesRead, false); + s = reader->playback(fData.begin() + offset, firstChunk - offset, 0, &bytesRead); SkASSERT(SkGPipeReader::kError_Status != s); if (SkGPipeReader::kDone_Status == s){ delete dumpReader; @@ -155,9 +154,11 @@ protected: SkASSERT(offset == firstChunk); //Then read the current atom fDumper->enable(); - s = dumpReader->playback(fData.begin() + offset, toBeRead - offset, NULL, true); + s = dumpReader->playback(fData.begin() + offset, toBeRead - offset, + SkGPipeReader::kReadAtom_PlaybackFlag); SkASSERT(SkGPipeReader::kError_Status != s); - s = reader->playback(fData.begin() + offset, toBeRead - offset, &bytesRead, true); + s = reader->playback(fData.begin() + offset, toBeRead - offset, + SkGPipeReader::kReadAtom_PlaybackFlag, &bytesRead); SkASSERT(SkGPipeReader::kError_Status != s); delete reader; -- cgit v1.2.3