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

Unified Diff: tests/SkResourceCacheTest.cpp

Issue 1811703002: return pictures as sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rely on RVO in picturerecorder Created 4 years, 9 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 | « tests/SerializationTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SkResourceCacheTest.cpp
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index 625b98a90332ef4eaa281ea4c584fcbc4e3807f4..7ae5f6486f8be6138c5595d3034b99d5ce16f4c8 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -322,8 +322,8 @@ DEF_TEST(BitmapCache_discarded_image, reporter) {
SkPictureRecorder recorder;
SkCanvas* canvas = recorder.beginRecording(10, 10);
canvas->clear(SK_ColorCYAN);
- sk_sp<SkPicture> picture(recorder.endRecording());
- return SkImage::MakeFromPicture(picture, SkISize::Make(10, 10), nullptr, nullptr);
+ return SkImage::MakeFromPicture(recorder.finishRecordingAsPicture(),
+ SkISize::Make(10, 10), nullptr, nullptr);
});
}
}
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698