diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-05 13:11:30 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-05 13:11:30 +0000 |
commit | 9dec727ff54efb1365599dcbdf6307c92a64a9ce (patch) | |
tree | f4997a248100ca55939cfa847d0b9e923e94083f /skia/ext/vector_platform_device_emf_win.h | |
parent | c6c09d400f06555f8be1005356152bb480f109ab (diff) | |
download | chromium_src-9dec727ff54efb1365599dcbdf6307c92a64a9ce.zip chromium_src-9dec727ff54efb1365599dcbdf6307c92a64a9ce.tar.gz chromium_src-9dec727ff54efb1365599dcbdf6307c92a64a9ce.tar.bz2 |
Revert 91504 - Stop using deprecated factory API for SkDevice
Review URL: http://codereview.chromium.org/7273013
TBR=reed@google.com
Review URL: http://codereview.chromium.org/7193040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/vector_platform_device_emf_win.h')
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h index 1aa8444..580f240 100644 --- a/skia/ext/vector_platform_device_emf_win.h +++ b/skia/ext/vector_platform_device_emf_win.h @@ -14,15 +14,21 @@ namespace skia { +class SK_API VectorPlatformDeviceEmfFactory : public SkDeviceFactory { + public: + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config, + int width, int height, + bool isOpaque, bool isForLayer) OVERRIDE; + static PlatformDevice* CreateDevice(int width, int height, bool isOpaque, + HANDLE shared_section); +}; + // A device is basically a wrapper around SkBitmap that provides a surface for // SkCanvas to draw into. This specific device is not not backed by a surface // and is thus unreadable. This is because the backend is completely vectorial. // This device is a simple wrapper over a Windows device context (HDC) handle. class VectorPlatformDeviceEmf : public PlatformDevice { public: - static PlatformDevice* CreateDevice(int width, int height, bool isOpaque, - HANDLE shared_section); - // Factory function. The DC is kept as the output context. static VectorPlatformDeviceEmf* create(HDC dc, int width, int height); @@ -75,9 +81,8 @@ class VectorPlatformDeviceEmf : public PlatformDevice { bool alpha_blend_used() const { return alpha_blend_used_; } protected: - virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, - int height, bool isOpaque, - Usage usage); + // Override from SkDevice (through PlatformDevice). + virtual SkDeviceFactory* onNewDeviceFactory(); private: // Applies the SkPaint's painting properties in the current GDI context, if |