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

Unified Diff: tests/ImageFilterCacheTest.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/FlattenableFactoryToName.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterCacheTest.cpp
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index f355714c522e5046b7a9a470f0047e2f54e9364e..c7b2170c0ff699c2dccf117cd90bb42cc0549eb8 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -169,9 +169,9 @@ static void test_image_backed(skiatest::Reporter* reporter, SkImage* srcImage) {
DEF_TEST(ImageFilterCache_ImageBackedRaster, reporter) {
SkBitmap srcBM = create_bm();
- SkAutoTUnref<SkImage> srcImage(SkImage::NewFromBitmap(srcBM));
+ sk_sp<SkImage> srcImage(SkImage::MakeFromBitmap(srcBM));
- test_image_backed(reporter, srcImage);
+ test_image_backed(reporter, srcImage.get());
}
#if SK_SUPPORT_GPU
@@ -202,13 +202,12 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, co
backendDesc.fHeight = kFullSize;
backendDesc.fSampleCnt = 0;
backendDesc.fTextureHandle = srcTexture->getTextureHandle();
- SkAutoTUnref<SkImage> srcImage(SkImage::NewFromTexture(context, backendDesc,
- kPremul_SkAlphaType));
+ sk_sp<SkImage> srcImage(SkImage::MakeFromTexture(context, backendDesc, kPremul_SkAlphaType));
if (!srcImage) {
return;
}
- test_image_backed(reporter, srcImage);
+ test_image_backed(reporter, srcImage.get());
}
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, context) {
« no previous file with comments | « tests/FlattenableFactoryToName.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698