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

Unified Diff: skia/ext/bitmap_platform_device_win.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_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.h
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 059b600f121232813c589d10a761b5f03fb3fbe0..74806b5e52d37a79ad19b002c66cc16faa9ff29b 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -10,6 +10,12 @@
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 Windows can also write
// to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a
@@ -62,6 +68,10 @@ class BitmapPlatformDevice : public PlatformDevice {
// See warning for copy constructor above.
BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
+ virtual SkDeviceFactory* getDeviceFactory() {
+ return SkNEW(SkBitmapPlatformDeviceFactory);
+ }
+
// Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
// bitmap DC is lazy created.
virtual HDC getBitmapDC();
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698