diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 22:27:25 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 22:27:25 +0000 |
commit | 9ffeb66751381d847a30560029eb6f98de2f1a2b (patch) | |
tree | cc5524cec5b9959f34bb7a3947f7fa39a2274cc9 /skia/ext/platform_canvas_linux.cc | |
parent | 8cde687634d8a736aae7538a69d6a360814010c9 (diff) | |
download | chromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.zip chromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.tar.gz chromium_src-9ffeb66751381d847a30560029eb6f98de2f1a2b.tar.bz2 |
Update use of SkCanvas and SkDevice to match change in Skia:
Refactor SkCanvas so that backends don't need to override it - instead take a device factory class. see: http://codereview.appspot.com/2103045/
BUG=New Skia devices required a corresponding canvas
TEST=None
Review URL: http://codereview.chromium.org/3590011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/platform_canvas_linux.cc')
-rw-r--r-- | skia/ext/platform_canvas_linux.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/skia/ext/platform_canvas_linux.cc b/skia/ext/platform_canvas_linux.cc index 109b232..5acbd14 100644 --- a/skia/ext/platform_canvas_linux.cc +++ b/skia/ext/platform_canvas_linux.cc @@ -12,18 +12,15 @@ namespace skia { -PlatformCanvas::PlatformCanvas() : SkCanvas() { -} - PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) - : SkCanvas() { + : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) { if (!initialize(width, height, is_opaque)) SK_CRASH(); } PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque, uint8_t* data) - : SkCanvas() { + : SkCanvas(SkNEW(SkBitmapPlatformDeviceFactory)) { if (!initialize(width, height, is_opaque, data)) SK_CRASH(); } @@ -50,13 +47,4 @@ void PlatformCanvas::endPlatformPaint() { // We don't need to do anything on Linux here. } -SkDevice* PlatformCanvas::createDevice(SkBitmap::Config config, - int width, - int height, - bool is_opaque, - bool isForLayer) { - SkASSERT(config == SkBitmap::kARGB_8888_Config); - return BitmapPlatformDevice::Create(width, height, is_opaque); -} - } // namespace skia |