Index: src/core/SkPictureRecorder.cpp |
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp |
index 282e2c22dde20025b8d9e50da90cb32e6f1775cd..e129a5e93ceaff86447129e4c257dadb8d472ff4 100644 |
--- a/src/core/SkPictureRecorder.cpp |
+++ b/src/core/SkPictureRecorder.cpp |
@@ -5,6 +5,7 @@ |
* found in the LICENSE file. |
*/ |
+#include "SkBigPicture.h" |
#include "SkData.h" |
#include "SkDrawable.h" |
#include "SkLayerInfo.h" |
@@ -53,13 +54,12 @@ SkPicture* SkPictureRecorder::endRecordingAsPicture() { |
SkAutoTUnref<SkLayerInfo> saveLayerData; |
if (fBBH && (fFlags & kComputeSaveLayerInfo_RecordFlag)) { |
- SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); |
- |
- saveLayerData.reset(SkNEW_ARGS(SkLayerInfo, (key))); |
+ saveLayerData.reset(SkNEW(SkLayerInfo)); |
} |
SkDrawableList* drawableList = fRecorder->getDrawableList(); |
- SkPicture::SnapshotArray* pictList = drawableList ? drawableList->newDrawableSnapshot() : NULL; |
+ SkBigPicture::SnapshotArray* pictList = |
+ drawableList ? drawableList->newDrawableSnapshot() : NULL; |
if (fBBH.get()) { |
if (saveLayerData) { |
@@ -77,12 +77,12 @@ SkPicture* SkPictureRecorder::endRecordingAsPicture() { |
for (int i = 0; pictList && i < pictList->count(); i++) { |
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]); |
} |
- return SkNEW_ARGS(SkPicture, (fCullRect, |
- fRecord.detach(), |
- pictList, |
- fBBH.detach(), |
- saveLayerData.detach(), |
- subPictureBytes)); |
+ return SkNEW_ARGS(SkBigPicture, (fCullRect, |
+ fRecord.detach(), |
+ pictList, |
+ fBBH.detach(), |
+ saveLayerData.detach(), |
+ subPictureBytes)); |
} |
void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { |
@@ -133,7 +133,7 @@ protected: |
} |
SkPicture* onNewPictureSnapshot() override { |
- SkPicture::SnapshotArray* pictList = NULL; |
+ SkBigPicture::SnapshotArray* pictList = NULL; |
if (fDrawableList) { |
// TODO: should we plumb-down the BBHFactory and recordFlags from our host |
// PictureRecorder? |
@@ -143,9 +143,7 @@ protected: |
SkAutoTUnref<SkLayerInfo> saveLayerData; |
if (fBBH && fDoSaveLayerInfo) { |
- SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); |
- |
- saveLayerData.reset(SkNEW_ARGS(SkLayerInfo, (key))); |
+ saveLayerData.reset(SkNEW(SkLayerInfo)); |
SkBBoxHierarchy* bbh = NULL; // we've already computed fBBH (received in constructor) |
// TODO: update saveLayer info computation to reuse the already computed |
@@ -157,14 +155,14 @@ protected: |
for (int i = 0; pictList && i < pictList->count(); i++) { |
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]); |
} |
- // SkPicture will take ownership of a ref on both fRecord and fBBH. |
+ // SkBigPicture will take ownership of a ref on both fRecord and fBBH. |
// We're not willing to give up our ownership, so we must ref them for SkPicture. |
- return SkNEW_ARGS(SkPicture, (fBounds, |
- SkRef(fRecord.get()), |
- pictList, |
- SkSafeRef(fBBH.get()), |
- saveLayerData.detach(), |
- subPictureBytes)); |
+ return SkNEW_ARGS(SkBigPicture, (fBounds, |
+ SkRef(fRecord.get()), |
+ pictList, |
+ SkSafeRef(fBBH.get()), |
+ saveLayerData.detach(), |
+ subPictureBytes)); |
} |
}; |