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/src/gpu/GrPictureUtils.cpp b/src/gpu/GrPictureUtils.cpp
index 6fed2f6..c677c64 100644
--- a/src/gpu/GrPictureUtils.cpp
+++ b/src/gpu/GrPictureUtils.cpp
@@ -250,11 +250,11 @@
virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE {
// BBH-based rendering doesn't re-issue many of the operations the gather
// process cares about (e.g., saves and restores) so it must be disabled.
- if (NULL != picture->fPlayback) {
+ if (NULL != picture->fPlayback.get()) {
picture->fPlayback->setUseBBH(false);
}
picture->draw(this);
- if (NULL != picture->fPlayback) {
+ if (NULL != picture->fPlayback.get()) {
picture->fPlayback->setUseBBH(true);
}
}