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

Unified Diff: skia/ext/platform_canvas_unittest.cc

Issue 2476113002: Change call-sites now that SkCanvas is not ref-counted (Closed)
Patch Set: try fixing win again Created 4 years, 1 month 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: skia/ext/platform_canvas_unittest.cc
diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc
index 67c7c8f045f3510b7f64c1569b7ae377826b9f2d..38d574f48805b8a21b0de292066953226852435a 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -233,7 +233,7 @@ const int kInnerH = 3;
// regular skia primitives.
TEST(PlatformCanvas, SkLayer) {
// Create the canvas initialized to opaque white.
- sk_sp<SkCanvas> canvas(CreatePlatformCanvas(16, 16, true));
+ std::unique_ptr<SkCanvas> canvas = CreatePlatformCanvas(16, 16, true);
canvas->drawColor(SK_ColorWHITE);
// Make a layer and fill it completely to make sure that the bounds are
@@ -248,7 +248,7 @@ TEST(PlatformCanvas, SkLayer) {
// Test native clipping.
TEST(PlatformCanvas, ClipRegion) {
// Initialize a white canvas
- sk_sp<SkCanvas> canvas(CreatePlatformCanvas(16, 16, true));
+ std::unique_ptr<SkCanvas> canvas = CreatePlatformCanvas(16, 16, true);
canvas->drawColor(SK_ColorWHITE);
EXPECT_TRUE(VerifyCanvasColor(*canvas, SK_ColorWHITE));
@@ -273,7 +273,7 @@ TEST(PlatformCanvas, ClipRegion) {
// Test the layers get filled properly by native rendering.
TEST(PlatformCanvas, FillLayer) {
// Create the canvas initialized to opaque white.
- sk_sp<SkCanvas> canvas(CreatePlatformCanvas(16, 16, true));
+ std::unique_ptr<SkCanvas> canvas(CreatePlatformCanvas(16, 16, true));
// Make a layer and fill it completely to make sure that the bounds are
// correct.
@@ -322,7 +322,7 @@ TEST(PlatformCanvas, FillLayer) {
// Test that translation + make layer works properly.
TEST(PlatformCanvas, TranslateLayer) {
// Create the canvas initialized to opaque white.
- sk_sp<SkCanvas> canvas(CreatePlatformCanvas(16, 16, true));
+ std::unique_ptr<SkCanvas> canvas = CreatePlatformCanvas(16, 16, true);
// Make a layer and fill it completely to make sure that the bounds are
// correct.

Powered by Google App Engine
This is Rietveld 408576698