aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureRecorder.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-07-13 13:27:16 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 13:27:16 -0700
commitdda54455a20dcd89de610bdb80e4a8e9137b80a4 (patch)
tree5c578a4207775bb102080fb304802ec43926de36 /src/core/SkPictureRecorder.cpp
parente92badc3ffce83668f76fcfa33a49784346cab1e (diff)
Remove GrLayerHoister
This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002 Review-Url: https://codereview.chromium.org/1950523002
Diffstat (limited to 'src/core/SkPictureRecorder.cpp')
-rw-r--r--src/core/SkPictureRecorder.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index 8ce770efce..5631a081d4 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -8,7 +8,6 @@
#include "SkBigPicture.h"
#include "SkData.h"
#include "SkDrawable.h"
-#include "SkLayerInfo.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkRecord.h"
@@ -71,23 +70,13 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag
}
}
- SkAutoTUnref<SkLayerInfo> saveLayerData;
-
- if (fBBH && (fFlags & kComputeSaveLayerInfo_RecordFlag)) {
- saveLayerData.reset(new SkLayerInfo);
- }
-
SkDrawableList* drawableList = fRecorder->getDrawableList();
SkBigPicture::SnapshotArray* pictList =
drawableList ? drawableList->newDrawableSnapshot() : nullptr;
if (fBBH.get()) {
SkAutoTMalloc<SkRect> bounds(fRecord->count());
- if (saveLayerData) {
- SkRecordComputeLayers(fCullRect, *fRecord, bounds, pictList, saveLayerData);
- } else {
- SkRecordFillBounds(fCullRect, *fRecord, bounds);
- }
+ SkRecordFillBounds(fCullRect, *fRecord, bounds);
fBBH->insert(bounds, fRecord->count());
// Now that we've calculated content bounds, we can update fCullRect, often trimming it.
@@ -103,7 +92,7 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]);
}
return sk_make_sp<SkBigPicture>(fCullRect, fRecord.release(), pictList, fBBH.release(),
- saveLayerData.release(), subPictureBytes);
+ subPictureBytes);
}
sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPictureWithCull(const SkRect& cullRect,
@@ -148,8 +137,7 @@ sk_sp<SkDrawable> SkPictureRecorder::finishRecordingAsDrawable(uint32_t finishFl
}
sk_sp<SkDrawable> drawable =
- sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawableList(), fCullRect,
- SkToBool(fFlags & kComputeSaveLayerInfo_RecordFlag));
+ sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawableList(), fCullRect);
// release our refs now, so only the drawable will be the owner.
fRecord.reset(nullptr);