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

Unified Diff: tests/ImageGeneratorTest.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 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
Index: tests/ImageGeneratorTest.cpp
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
index 3d750b2c7327cc909ba78fa5911d7c711a4c4ed5..63a47e46b1b85bc68d26e3527db66c2d816bcfab 100644
--- a/tests/ImageGeneratorTest.cpp
+++ b/tests/ImageGeneratorTest.cpp
@@ -19,21 +19,21 @@ static SkImageGenerator* my_factory(SkData*) {
static void test_imagegenerator_factory(skiatest::Reporter* reporter) {
// just need a non-empty data to test things
- SkAutoTUnref<SkData> data(SkData::NewWithCString("test_imagegenerator_factory"));
+ sk_sp<SkData> data(SkData::MakeWithCString("test_imagegenerator_factory"));
gMyFactoryWasCalled = false;
SkImageGenerator* gen;
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled);
- gen = SkImageGenerator::NewFromEncoded(data);
+ gen = SkImageGenerator::NewFromEncoded(data.get());
REPORTER_ASSERT(reporter, nullptr == gen);
REPORTER_ASSERT(reporter, !gMyFactoryWasCalled);
// Test is racy, in that it hopes no other thread is changing this global...
SkGraphics::ImageGeneratorFromEncodedFactory prev =
SkGraphics::SetImageGeneratorFromEncodedFactory(my_factory);
- gen = SkImageGenerator::NewFromEncoded(data);
+ gen = SkImageGenerator::NewFromEncoded(data.get());
REPORTER_ASSERT(reporter, nullptr == gen);
REPORTER_ASSERT(reporter, gMyFactoryWasCalled);
SkGraphics::SetImageGeneratorFromEncodedFactory(prev);
« include/core/SkData.h ('K') | « tests/DataRefTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698