summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_canvas_linux.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 05:26:00 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 05:26:00 +0000
commit8a7ef121c533b8f26199ce187982b327015b29e7 (patch)
tree1f9aaf05d33fa09f1b56bade75450040df17c9c6 /skia/ext/platform_canvas_linux.cc
parentd0d61e7aac0754552bd669d871882bd0390a60e5 (diff)
downloadchromium_src-8a7ef121c533b8f26199ce187982b327015b29e7.zip
chromium_src-8a7ef121c533b8f26199ce187982b327015b29e7.tar.gz
chromium_src-8a7ef121c533b8f26199ce187982b327015b29e7.tar.bz2
Wire up missing functionality in BitmapPlatformContext to allow the creation of a skia::PlatformCanvas
from a CGContextRef. TEST=test_shell_tests, try (mac,win,linux) Original review=http://codereview.chromium.org/6064007/ Patch by sjl@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/platform_canvas_linux.cc')
-rw-r--r--skia/ext/platform_canvas_linux.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/skia/ext/platform_canvas_linux.cc b/skia/ext/platform_canvas_linux.cc
index 8e9db62..5d3594e 100644
--- a/skia/ext/platform_canvas_linux.cc
+++ b/skia/ext/platform_canvas_linux.cc
@@ -29,14 +29,8 @@ PlatformCanvas::~PlatformCanvas() {
}
bool PlatformCanvas::initialize(int width, int height, bool is_opaque,
uint8_t* data) {
- SkDevice* device =
- BitmapPlatformDevice::Create(width, height, is_opaque, data);
- if (!device)
- return false;
-
- setDevice(device);
- device->unref(); // was created with refcount 1, and setDevice also refs
- return true;
+ return initializeWithDevice(BitmapPlatformDevice::Create(
+ width, height, is_opaque, data));
}
cairo_t* PlatformCanvas::beginPlatformPaint() {