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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 1112523006: Sketch splitting SkPicture into an interface and SkBigPicture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: note 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 ba15c1b5126b24bb2f9d796e1022d68547ac50ca..65e6d490db6e670e0514c789b24b7763608d9706 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -587,7 +587,7 @@ private:
class CollectLayers : SkNoncopyable {
public:
CollectLayers(const SkRect& cullRect, const SkRecord& record,
- const SkPicture::SnapshotArray* pictList, SkLayerInfo* accelData)
+ const SkBigPicture::SnapshotArray* pictList, SkLayerInfo* accelData)
: fSaveLayersInStack(0)
, fAccelData(accelData)
, fPictList(pictList)
@@ -640,10 +640,10 @@ private:
void trackSaveLayersForPicture(const SkPicture* picture, const SkPaint* paint) {
// For sub-pictures, we wrap their layer information within the parent
// picture's rendering hierarchy
- SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
-
- const SkLayerInfo* childData =
- static_cast<const SkLayerInfo*>(picture->EXPERIMENTAL_getAccelData(key));
+ const SkLayerInfo* childData = NULL;
+ if (const SkBigPicture* bp = picture->asSkBigPicture()) {
+ childData = static_cast<const SkLayerInfo*>(bp->accelData());
+ }
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 @@ private:
// The op code indices of all the currently active saveLayers
SkTDArray<unsigned> fSaveLayerOpStack;
SkLayerInfo* fAccelData;
- const SkPicture::SnapshotArray* fPictList;
+ const SkBigPicture::SnapshotArray* fPictList;
SkRecords::FillBounds fFillBounds;
};
@@ -793,7 +793,7 @@ void SkRecordFillBounds(const SkRect& cullRect, const SkRecord& record, SkBBoxHi
}
void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record,
- const SkPicture::SnapshotArray* pictList, SkBBoxHierarchy* bbh,
+ const SkBigPicture::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