diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 05:26:00 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 05:26:00 +0000 |
commit | 8a7ef121c533b8f26199ce187982b327015b29e7 (patch) | |
tree | 1f9aaf05d33fa09f1b56bade75450040df17c9c6 /skia/ext/platform_canvas.h | |
parent | d0d61e7aac0754552bd669d871882bd0390a60e5 (diff) | |
download | chromium_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.h')
-rw-r--r-- | skia/ext/platform_canvas.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h index b602ed46..1e51717 100644 --- a/skia/ext/platform_canvas.h +++ b/skia/ext/platform_canvas.h @@ -47,6 +47,7 @@ class PlatformCanvas : public SkCanvas { PlatformCanvas(int width, int height, bool is_opaque, uint8_t* context); // For two-part init, call if you use the no-argument constructor above + bool initialize(CGContextRef context, int width, int height, bool is_opaque); bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL); #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ @@ -106,6 +107,9 @@ class PlatformCanvas : public SkCanvas { // CoreGraphics. virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); + // Helper method used internally by the initialize() methods. + bool initializeWithDevice(SkDevice* device); + // Disallow copy and assign. PlatformCanvas(const PlatformCanvas&); PlatformCanvas& operator=(const PlatformCanvas&); |