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

Unified Diff: skia/ext/platform_canvas_unittest.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
===================================================================
--- skia/ext/platform_canvas_unittest.cc (revision 165342)
+++ skia/ext/platform_canvas_unittest.cc (working copy)
@@ -194,7 +194,8 @@
// regular skia primitives.
TEST(PlatformCanvas, SkLayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ SkAutoTUnref<PlatformCanvas> holder(CreatePlatformCanvas(16, 16, true));
+ PlatformCanvas& canvas = *holder.get();
canvas.drawColor(SK_ColorWHITE);
// Make a layer and fill it completely to make sure that the bounds are
@@ -211,7 +212,8 @@
// Test native clipping.
TEST(PlatformCanvas, ClipRegion) {
// Initialize a white canvas
- PlatformCanvas canvas(16, 16, true);
+ SkAutoTUnref<PlatformCanvas> holder(CreatePlatformCanvas(16, 16, true));
+ PlatformCanvas& canvas = *holder.get();
canvas.drawColor(SK_ColorWHITE);
EXPECT_TRUE(VerifyCanvasColor(canvas, SK_ColorWHITE));
@@ -238,7 +240,8 @@
// Test the layers get filled properly by native rendering.
TEST(PlatformCanvas, FillLayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ SkAutoTUnref<PlatformCanvas> holder(CreatePlatformCanvas(16, 16, true));
+ PlatformCanvas& canvas = *holder.get();
// Make a layer and fill it completely to make sure that the bounds are
// correct.
@@ -297,7 +300,8 @@
// Test that translation + make layer works properly.
TEST(PlatformCanvas, TranslateLayer) {
// Create the canvas initialized to opaque white.
- PlatformCanvas canvas(16, 16, true);
+ SkAutoTUnref<PlatformCanvas> holder(CreatePlatformCanvas(16, 16, true));
+ PlatformCanvas& canvas = *holder.get();
// Make a layer and fill it completely to make sure that the bounds are
// correct.

Powered by Google App Engine
This is Rietveld 408576698