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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 1130333002: Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/core/SkRecordDraw.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 65e6d490db6e670e0514c789b24b7763608d9706..ba15c1b5126b24bb2f9d796e1022d68547ac50ca 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -587,7 +587,7 @@
class CollectLayers : SkNoncopyable {
public:
CollectLayers(const SkRect& cullRect, const SkRecord& record,
- const SkBigPicture::SnapshotArray* pictList, SkLayerInfo* accelData)
+ const SkPicture::SnapshotArray* pictList, SkLayerInfo* accelData)
: fSaveLayersInStack(0)
, fAccelData(accelData)
, fPictList(pictList)
@@ -640,10 +640,10 @@
void trackSaveLayersForPicture(const SkPicture* picture, const SkPaint* paint) {
// For sub-pictures, we wrap their layer information within the parent
// picture's rendering hierarchy
- const SkLayerInfo* childData = NULL;
- if (const SkBigPicture* bp = picture->asSkBigPicture()) {
- childData = static_cast<const SkLayerInfo*>(bp->accelData());
- }
+ SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
+
+ const SkLayerInfo* childData =
+ static_cast<const SkLayerInfo*>(picture->EXPERIMENTAL_getAccelData(key));
if (!childData) {
// If the child layer hasn't been generated with saveLayer data we
// assume the worst (i.e., that it does contain layers which nest
@@ -774,7 +774,7 @@
// The op code indices of all the currently active saveLayers
SkTDArray<unsigned> fSaveLayerOpStack;
SkLayerInfo* fAccelData;
- const SkBigPicture::SnapshotArray* fPictList;
+ const SkPicture::SnapshotArray* fPictList;
SkRecords::FillBounds fFillBounds;
};
@@ -793,7 +793,7 @@
}
void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record,
- const SkBigPicture::SnapshotArray* pictList, SkBBoxHierarchy* bbh,
+ const SkPicture::SnapshotArray* pictList, SkBBoxHierarchy* bbh,
SkLayerInfo* data) {
SkRecords::CollectLayers visitor(cullRect, record, pictList, data);
« no previous file with comments | « src/core/SkRecordDraw.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698