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

Unified Diff: debugger/QT/SkDebuggerGUI.cpp

Issue 334493002: Remove SkPicture pointer from SkPicturePlayback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 6 years, 6 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 | include/core/SkPicture.h » ('j') | src/core/SkPicture.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/QT/SkDebuggerGUI.cpp
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 0f816eec7cebd55d8b726e903f180158b9642437..1873afca678d972cf7f68e9ccc125916041736c9 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -160,23 +160,21 @@ void SkDebuggerGUI::showDeletes() {
// offsets to individual commands.
class SkTimedPicturePlayback : public SkPicturePlayback {
public:
- static SkTimedPicturePlayback* CreateFromStream(SkPicture* picture,
- SkStream* stream, const SkPictInfo& info,
+ static SkTimedPicturePlayback* CreateFromStream(SkStream* stream, const SkPictInfo& info,
SkPicture::InstallPixelRefProc proc,
const SkTDArray<bool>& deletedCommands) {
// Mimics SkPicturePlayback::CreateFromStream
SkAutoTDelete<SkTimedPicturePlayback> playback(SkNEW_ARGS(SkTimedPicturePlayback,
- (picture, deletedCommands, info)));
- if (!playback->parseStream(picture, stream, proc)) {
+ (deletedCommands, info)));
+ if (!playback->parseStream(stream, proc)) {
return NULL; // we're invalid
}
return playback.detach();
}
- SkTimedPicturePlayback(SkPicture* picture,
- const SkTDArray<bool>& deletedCommands,
+ SkTimedPicturePlayback(const SkTDArray<bool>& deletedCommands,
const SkPictInfo& info)
- : INHERITED(picture, info)
+ : INHERITED(info)
, fSkipCommands(deletedCommands)
, fTot(0.0)
, fCurCommand(0) {
@@ -272,21 +270,20 @@ public:
return NULL;
}
- SkTimedPicture* newPict = SkNEW_ARGS(SkTimedPicture, (NULL, info.fWidth, info.fHeight));
// Check to see if there is a playback to recreate.
if (stream->readBool()) {
SkTimedPicturePlayback* playback = SkTimedPicturePlayback::CreateFromStream(
- newPict, stream,
+ stream,
info, proc,
deletedCommands);
if (NULL == playback) {
- SkDELETE(newPict);
return NULL;
}
- newPict->fPlayback = playback;
+
+ return SkNEW_ARGS(SkTimedPicture, (playback, info.fWidth, info.fHeight));
}
- return newPict;
+ return NULL;
mtklein 2014/06/11 21:12:58 This used to return a SkTimedPicture(NULL, w, h) i
robertphillips 2014/06/12 12:27:29 My thinking on this is that the caller already has
}
void resetTimes() { ((SkTimedPicturePlayback*) fPlayback)->resetTimes(); }
« no previous file with comments | « no previous file | include/core/SkPicture.h » ('j') | src/core/SkPicture.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698