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

Unified Diff: src/core/SkPicture.cpp

Issue 377623002: Split SkPicturePlayback out of SkPictureData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add virtual dtor for SkPicturePlayback Created 6 years, 5 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 | « include/utils/SkPictureUtils.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 0c6f31b2ed0e20c8e52dfdae2c4bbc4cdc8cea3d..d8b69d4c2b289abc9c16d0f7476f694f5b2df430 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -9,6 +9,7 @@
#include "SkPictureFlat.h"
#include "SkPictureData.h"
+#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
#include "SkPictureRecorder.h"
@@ -292,27 +293,13 @@ SkPicture::AccelData::Domain SkPicture::AccelData::GenerateDomain() {
///////////////////////////////////////////////////////////////////////////////
-// fRecord OK
-const SkPicture::OperationList& SkPicture::OperationList::InvalidList() {
- static OperationList gInvalid;
- return gInvalid;
-}
-
// fRecord TODO
-const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRect& queryRect) const {
+const SkPicture::OperationList* SkPicture::EXPERIMENTAL_getActiveOps(const SkIRect& queryRect) const {
SkASSERT(NULL != fData.get());
if (NULL != fData.get()) {
return fData->getActiveOps(queryRect);
}
- return OperationList::InvalidList();
-}
-
-// fRecord TODO
-size_t SkPicture::EXPERIMENTAL_curOpID() const {
- if (NULL != fData.get()) {
- return fData->curOpID();
- }
- return 0;
+ return NULL;
}
// fRecord OK
@@ -321,7 +308,8 @@ void SkPicture::draw(SkCanvas* canvas, SkDrawPictureCallback* callback) const {
SkASSERT(NULL != fData.get() || NULL != fRecord.get());
if (NULL != fData.get()) {
- fData->draw(*canvas, callback);
+ SkPicturePlayback playback(this);
+ playback.draw(canvas, callback);
}
if (NULL != fRecord.get()) {
SkRecordDraw(*fRecord, canvas, callback);
@@ -538,16 +526,6 @@ bool SkPicture::willPlayBackBitmaps() const {
return fData->containsBitmaps();
}
-#ifdef SK_BUILD_FOR_ANDROID
-// fRecord TODO, fix by switching Android to SkDrawPictureCallback, then deleting this method
-void SkPicture::abortPlayback() {
- if (NULL == fData.get()) {
- return;
- }
- fData->abort();
-}
-#endif
-
// fRecord OK
static int32_t next_picture_generation_id() {
static int32_t gPictureGenerationID = 0;
« no previous file with comments | « include/utils/SkPictureUtils.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698