Use sk_sp-based picture recording APIs
1) use SkPictureRecorder::finishRecordingAsPicture() over
endRecordingAsPicture()
2) convert to sk_sp<SkPicture> fields/params where feasible
BUG=skia:5077
[email protected],[email protected],[email protected]
[email protected],[email protected]
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1819683002
Cr-Commit-Position: refs/heads/master@{#382563}
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index af5cfb45..2763cf90 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -129,12 +129,12 @@
is_mask_ = is_mask;
}
-skia::RefPtr<SkPicture> PictureLayer::GetPicture() const {
+sk_sp<SkPicture> PictureLayer::GetPicture() const {
// We could either flatten the DisplayListRecordingSource into a single
// SkPicture, or paint a fresh one depending on what we intend to do with the
// picture. For now we just paint a fresh one to get consistent results.
if (!DrawsContent())
- return skia::RefPtr<SkPicture>();
+ return nullptr;
gfx::Size layer_size = bounds();
scoped_ptr<DisplayListRecordingSource> recording_source(