summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorskaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 16:58:14 +0000
committerskaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 16:58:14 +0000
commitf2af4e342bb0f85d080b0db2762de0c612c17041 (patch)
treebff4efe5c59bfc8de21341939541ca15e6e02b81 /skia
parentb4cd1d4754a4ee1db500d1b0d49e42139724ab34 (diff)
downloadchromium_src-f2af4e342bb0f85d080b0db2762de0c612c17041.zip
chromium_src-f2af4e342bb0f85d080b0db2762de0c612c17041.tar.gz
chromium_src-f2af4e342bb0f85d080b0db2762de0c612c17041.tar.bz2
Removed skia::ScopedPlatformCanvas.
No changes in behavior. This is a trivial class that has only one actual use outside of unit tests. The reason for the removal is specific to Windows component builds and somewhat complicated. The pattern of exporting a class that inherits a non exported template causes the template to be implicitly exported on Windows. That might cause multiple definition linker errors for users of the template in other DLLs. For more info refer to this blog post: http://www.codesynthesis.com/~boris/blog/2010/01/18/dll-export-cxx-templates/ NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12972002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/platform_canvas.h8
-rw-r--r--skia/ext/platform_canvas_unittest.cc8
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.