Enable basic drawing with SkRecord-based pictures.
I've tagged all the functions in SkPicture.cpp is // fRecord TODO or // fRecord
OK, depending on whether or not they're totally broken when used from an
SkRecord-based picture. Obviously next steps are to eliminate all the TODOs,
then clean up the notes.
I converted SkPicture over to smart pointers too. It's particularly helpful
that the smart pointers initialize to NULL by default.
For now I've got all the SkRecord-based code jammed in at the bottom of the file. I figure it'll help me keep things straight for a bit, then we can rearrange later.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/333823007
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 5cecba2..a3783e9 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -286,16 +286,16 @@
return NULL;
}
- void resetTimes() { ((SkTimedPicturePlayback*) fPlayback)->resetTimes(); }
+ void resetTimes() { ((SkTimedPicturePlayback*) fPlayback.get())->resetTimes(); }
- int count() const { return ((SkTimedPicturePlayback*) fPlayback)->count(); }
+ int count() const { return ((SkTimedPicturePlayback*) fPlayback.get())->count(); }
// return the fraction of the total time this command consumed
- double time(int index) const { return ((SkTimedPicturePlayback*) fPlayback)->time(index); }
+ double time(int index) const { return ((SkTimedPicturePlayback*) fPlayback.get())->time(index); }
- const SkTDArray<double>* typeTimes() const { return ((SkTimedPicturePlayback*) fPlayback)->typeTimes(); }
+ const SkTDArray<double>* typeTimes() const { return ((SkTimedPicturePlayback*) fPlayback.get())->typeTimes(); }
- double totTime() const { return ((SkTimedPicturePlayback*) fPlayback)->totTime(); }
+ double totTime() const { return ((SkTimedPicturePlayback*) fPlayback.get())->totTime(); }
private:
// disallow default ctor b.c. we don't have a good way to setup the fPlayback ptr