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

Unified Diff: tests/SkResourceCacheTest.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/ResourceCacheTest.cpp ('k') | tests/SurfaceTest.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 7ae5f6486f8be6138c5595d3034b99d5ce16f4c8..3c0d1ffee3a467d00c6e35545a3ed1b003c73942 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -264,7 +264,7 @@ DEF_TEST(BitmapCache_discarded_bitmap, reporter) {
static void test_discarded_image(skiatest::Reporter* reporter, const SkMatrix& transform,
sk_sp<SkImage> (*buildImage)()) {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(10, 10));
+ auto surface(SkSurface::MakeRasterN32Premul(10, 10));
SkCanvas* canvas = surface->getCanvas();
// SkBitmapCache is global, so other threads could be evicting our bitmaps. Loop a few times
@@ -313,7 +313,7 @@ DEF_TEST(BitmapCache_discarded_image, reporter) {
for (size_t i = 0; i < SK_ARRAY_COUNT(xforms); ++i) {
test_discarded_image(reporter, xforms[i], []() {
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(10, 10));
+ auto surface(SkSurface::MakeRasterN32Premul(10, 10));
surface->getCanvas()->clear(SK_ColorCYAN);
return surface->makeImageSnapshot();
});
« no previous file with comments | « tests/ResourceCacheTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698