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

Unified Diff: tests/RecorderTest.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage 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/RecordDrawTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecorderTest.cpp
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp
index 9d7fda5483d5b026b4bd0aaa3d7a5f8fd0da3cc7..b1af1388fba3c4340dfb9b55c8ae8fcf6cd7a52d 100644
--- a/tests/RecorderTest.cpp
+++ b/tests/RecorderTest.cpp
@@ -72,18 +72,18 @@ DEF_TEST(Recorder_RefLeaking, r) {
DEF_TEST(Recorder_drawImage_takeReference, reporter) {
- SkAutoTUnref<SkImage> image;
+ sk_sp<SkImage> image;
{
SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(100, 100));
surface->getCanvas()->clear(SK_ColorGREEN);
- image.reset(surface->newImageSnapshot());
+ image = surface->makeImageSnapshot();
}
{
SkRecord record;
SkRecorder recorder(&record, 100, 100);
// DrawImage is supposed to take a reference
- recorder.drawImage(image.get(), 0, 0);
+ recorder.drawImage(image, 0, 0);
REPORTER_ASSERT(reporter, !image->unique());
Tally tally;
@@ -98,7 +98,7 @@ DEF_TEST(Recorder_drawImage_takeReference, reporter) {
SkRecorder recorder(&record, 100, 100);
// DrawImageRect is supposed to take a reference
- recorder.drawImageRect(image.get(), SkRect::MakeWH(100, 100), nullptr);
+ recorder.drawImageRect(image, SkRect::MakeWH(100, 100), nullptr);
REPORTER_ASSERT(reporter, !image->unique());
Tally tally;
« no previous file with comments | « tests/RecordDrawTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698