diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-25 16:05:00 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-25 16:05:00 +0000 |
commit | 12d588a7f28e18f87f5f9a6eb57fc1f5137a8d28 (patch) | |
tree | 499ba7331524b98cb223c7af0a94e5a184e32276 /debugger | |
parent | 0ba4bf427acbd7707d04192a98c77ef194a0f25a (diff) |
Remove bogus ability for creating an SkPicturePlayback to fail.
Change SkPicturePlayback::parseBufferTag to return void, since
it can never return false.
Change SkPicturePlayback::parseStreamTag to return void, since
the only way it can return false is if parseBufferTag returns
false, or if creating a sub picture failed, both of which are
nonsensical.
Due to the above, there is no reason for creating an
SkPicturePlayback to fail, so remove the isValid parameter.
Update subclasses in SkDebuggerGUI.
Review URL: https://codereview.appspot.com/7388050
git-svn-id: http://skia.googlecode.com/svn/trunk@7844 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger')
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index e3050cb87c..f1f4694d03 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -143,10 +143,10 @@ void SkDebuggerGUI::showDeletes() { // offsets to individual commands. class SkTimedPicturePlayback : public SkPicturePlayback { public: - SkTimedPicturePlayback(SkStream* stream, const SkPictInfo& info, bool* isValid, + SkTimedPicturePlayback(SkStream* stream, const SkPictInfo& info, SkPicture::InstallPixelRefProc proc, const SkTDArray<size_t>& offsets, const SkTDArray<bool>& deletedCommands) - : INHERITED(stream, info, isValid, proc) + : INHERITED(stream, info, proc) , fOffsets(offsets) , fSkipCommands(deletedCommands) , fTot(0.0) @@ -270,14 +270,8 @@ public: } if (stream->readBool()) { - bool isValid = false; fPlayback = SkNEW_ARGS(SkTimedPicturePlayback, - (stream, info, &isValid, proc, offsets, deletedCommands)); - if (!isValid) { - SkDELETE(fPlayback); - fPlayback = NULL; - return; - } + (stream, info, proc, offsets, deletedCommands)); } // do this at the end, so that they will be zero if we hit an error. @@ -924,9 +918,9 @@ void SkDebuggerGUI::setupDirectoryWidget(const QString& path) { // These are needed by the profiling system. class SkOffsetPicturePlayback : public SkPicturePlayback { public: - SkOffsetPicturePlayback(SkStream* stream, const SkPictInfo& info, bool* isValid, + SkOffsetPicturePlayback(SkStream* stream, const SkPictInfo& info, SkPicture::InstallPixelRefProc proc) - : INHERITED(stream, info, isValid, proc) { + : INHERITED(stream, info, proc) { } const SkTDArray<size_t>& offsets() const { return fOffsets; } @@ -964,13 +958,7 @@ public: } if (stream->readBool()) { - bool isValid = false; - fPlayback = SkNEW_ARGS(SkOffsetPicturePlayback, (stream, info, &isValid, proc)); - if (!isValid) { - SkDELETE(fPlayback); - fPlayback = NULL; - return; - } + fPlayback = SkNEW_ARGS(SkOffsetPicturePlayback, (stream, info, proc)); } // do this at the end, so that they will be zero if we hit an error. |