diff options
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/platform_canvas.h | 8 | ||||
-rw-r--r-- | skia/ext/platform_canvas_unittest.cc | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h index d8fd727..3ef2cff 100644 --- a/skia/ext/platform_canvas.h +++ b/skia/ext/platform_canvas.h @@ -90,14 +90,6 @@ static inline SkCanvas* TryCreateBitmapCanvas(int width, RETURN_NULL_ON_FAILURE); } -class SK_API ScopedPlatformCanvas : public RefPtr<SkCanvas> { - public: - ScopedPlatformCanvas(int width, int height, bool is_opaque) - : RefPtr<SkCanvas>(AdoptRef( - CreatePlatformCanvas(width, height, is_opaque))) - {} -}; - // Return the stride (length of a line in bytes) for the given width. Because // we use 32-bits per pixel, this will be roughly 4*width. However, for // alignment reasons we may wish to increase that. diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc index f98a0e9..7595bca 100644 --- a/skia/ext/platform_canvas_unittest.cc +++ b/skia/ext/platform_canvas_unittest.cc @@ -196,7 +196,7 @@ const SkScalar kRadius = 2.0; // regular skia primitives. TEST(PlatformCanvas, SkLayer) { // Create the canvas initialized to opaque white. - ScopedPlatformCanvas canvas(16, 16, true); + RefPtr<SkCanvas> canvas = AdoptRef(CreatePlatformCanvas(16, 16, true)); canvas->drawColor(SK_ColorWHITE); // Make a layer and fill it completely to make sure that the bounds are @@ -213,7 +213,7 @@ TEST(PlatformCanvas, SkLayer) { // Test native clipping. TEST(PlatformCanvas, ClipRegion) { // Initialize a white canvas - ScopedPlatformCanvas canvas(16, 16, true); + RefPtr<SkCanvas> canvas = AdoptRef(CreatePlatformCanvas(16, 16, true)); canvas->drawColor(SK_ColorWHITE); EXPECT_TRUE(VerifyCanvasColor(*canvas, SK_ColorWHITE)); @@ -240,7 +240,7 @@ TEST(PlatformCanvas, ClipRegion) { // Test the layers get filled properly by native rendering. TEST(PlatformCanvas, FillLayer) { // Create the canvas initialized to opaque white. - ScopedPlatformCanvas canvas(16, 16, true); + RefPtr<SkCanvas> canvas = AdoptRef(CreatePlatformCanvas(16, 16, true)); // Make a layer and fill it completely to make sure that the bounds are // correct. @@ -299,7 +299,7 @@ TEST(PlatformCanvas, FillLayer) { // Test that translation + make layer works properly. TEST(PlatformCanvas, TranslateLayer) { // Create the canvas initialized to opaque white. - ScopedPlatformCanvas canvas(16, 16, true); + RefPtr<SkCanvas> canvas = AdoptRef(CreatePlatformCanvas(16, 16, true)); // Make a layer and fill it completely to make sure that the bounds are // correct. |