Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: skia/ext/bitmap_platform_device_mac.h

Issue 3590011: Update use of SkCanvas and SkDevice to match change in Skia (Closed)
Patch Set: Bump deps again to bring in fix for memory leak Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/ext/bitmap_platform_device_linux.cc ('k') | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_mac.h
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 195dca866ae9f6417b4ac76a8daa76339777c0b9..68c717ce3b309c9e039058303c80244e4065e262 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -10,6 +10,13 @@
namespace skia {
+class SkBitmapPlatformDeviceFactory : public SkRasterDeviceFactory {
+ public:
+ virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height,
+ bool isOpaque, bool isForLayer);
+};
+
+
// A device is basically a wrapper around SkBitmap that provides a surface for
// SkCanvas to draw into. Our device provides a surface CoreGraphics can also
// write to. BitmapPlatformDevice creates a bitmap using
@@ -50,6 +57,10 @@ class BitmapPlatformDevice : public PlatformDevice {
BitmapPlatformDevice(const BitmapPlatformDevice& other);
virtual ~BitmapPlatformDevice();
+ virtual SkDeviceFactory* getDeviceFactory() {
+ return SkNEW(SkBitmapPlatformDeviceFactory);
+ }
+
// See warning for copy constructor above.
BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
« no previous file with comments | « skia/ext/bitmap_platform_device_linux.cc ('k') | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698