diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 03:41:22 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 03:41:22 +0000 |
commit | 063f8db1c4ec940c6391a36f85c9bcb124fbed9a (patch) | |
tree | 62be78e0e699429c27ea0f1797c16ed0bdb2aacd /skia/ext/vector_canvas.h | |
parent | 2aba747f04b9466ec85ff659285192da21195c32 (diff) | |
download | chromium_src-063f8db1c4ec940c6391a36f85c9bcb124fbed9a.zip chromium_src-063f8db1c4ec940c6391a36f85c9bcb124fbed9a.tar.gz chromium_src-063f8db1c4ec940c6391a36f85c9bcb124fbed9a.tar.bz2 |
Unfork VectorPlatformCanvas.
Unfork VectorPlatformCanvas by making NativeMetafile know how to create an appropriate VectorPlatformDevice. This will also be useful when we have multiple NativeMetafile implemenations (each requiring a different VectorPlatformDevices).
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6665046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/vector_canvas.h')
-rw-r--r-- | skia/ext/vector_canvas.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/skia/ext/vector_canvas.h b/skia/ext/vector_canvas.h index 4f8bc7a..4b4419d 100644 --- a/skia/ext/vector_canvas.h +++ b/skia/ext/vector_canvas.h @@ -7,38 +7,21 @@ #pragma once #include "skia/ext/platform_canvas.h" -#include "skia/ext/vector_platform_device.h" - -#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) -typedef struct _cairo cairo_t; -#endif namespace skia { +class PlatformDevice; + // This class is a specialization of the regular PlatformCanvas. It is designed // to work with a VectorDevice to manage platform-specific drawing. It allows // using both Skia operations and platform-specific operations. It *doesn't* // support reading back from the bitmap backstore since it is not used. class SK_API VectorCanvas : public PlatformCanvas { public: - VectorCanvas(); - explicit VectorCanvas(SkDeviceFactory* factory); -#if defined(WIN32) - VectorCanvas(HDC dc, int width, int height); -#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) - // Caller owns |context|. Ownership is not transferred. - VectorCanvas(cairo_t* context, int width, int height); -#endif + // Ownership of |device| is transfered to VectorCanvas. + explicit VectorCanvas(PlatformDevice* device); virtual ~VectorCanvas(); - // For two-part init, call if you use the no-argument constructor above -#if defined(WIN32) - bool initialize(HDC context, int width, int height); -#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) - // Ownership of |context| is not transferred. - bool initialize(cairo_t* context, int width, int height); -#endif - virtual SkBounder* setBounder(SkBounder* bounder); virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter); |