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

Unified Diff: skia/ext/bitmap_platform_device_linux.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 | « DEPS ('k') | skia/ext/bitmap_platform_device_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_linux.h
diff --git a/skia/ext/bitmap_platform_device_linux.h b/skia/ext/bitmap_platform_device_linux.h
index 1c6579cc15fba7358e3c0599057306e09b11753d..daea4c413039c2ee561d3fc8de5f243766ef5f4e 100644
--- a/skia/ext/bitmap_platform_device_linux.h
+++ b/skia/ext/bitmap_platform_device_linux.h
@@ -43,6 +43,12 @@ typedef struct _cairo_surface cairo_surface_t;
namespace skia {
+class SkBitmapPlatformDeviceFactory : public SkRasterDeviceFactory {
+ public:
+ virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height,
+ bool isOpaque, bool isForLayer);
+};
+
// -----------------------------------------------------------------------------
// This is the Linux bitmap backing for Skia. We create a Cairo image surface
// to store the backing buffer. This buffer is BGRA in memory (on little-endian
@@ -79,6 +85,10 @@ class BitmapPlatformDevice : public PlatformDevice {
// A stub copy constructor. Needs to be properly implemented.
BitmapPlatformDevice(const BitmapPlatformDevice& other);
+ virtual SkDeviceFactory* getDeviceFactory() {
+ return SkNEW(SkBitmapPlatformDeviceFactory);
+ }
+
virtual void makeOpaque(int x, int y, int width, int height);
// Bitmaps aren't vector graphics.
« no previous file with comments | « DEPS ('k') | skia/ext/bitmap_platform_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698