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

Unified Diff: tests/PictureShaderTest.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/PictureBBHTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureShaderTest.cpp
diff --git a/tests/PictureShaderTest.cpp b/tests/PictureShaderTest.cpp
index 4da7aab5116d1fc481806a04d7cda00d70bda76a..78d59afd411f9e4659319af5abbefe0cbc56ab5f 100644
--- a/tests/PictureShaderTest.cpp
+++ b/tests/PictureShaderTest.cpp
@@ -31,8 +31,8 @@ DEF_TEST(PictureShader_empty, reporter) {
SkPictureRecorder factory;
factory.beginRecording(0, 0, nullptr, 0);
- sk_sp<SkPicture> picture(factory.endRecording());
- paint.setShader(SkShader::MakePictureShader(std::move(picture), SkShader::kClamp_TileMode,
+ paint.setShader(SkShader::MakePictureShader(factory.finishRecordingAsPicture(),
+ SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode, nullptr, nullptr));
canvas.drawRect(SkRect::MakeWH(1,1), paint);
« no previous file with comments | « tests/PictureBBHTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698