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

Unified Diff: skia/ext/vector_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 | « skia/ext/vector_platform_device.h ('k') | skia/ext/vector_platform_device_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_linux.h
diff --git a/skia/ext/vector_platform_device_linux.h b/skia/ext/vector_platform_device_linux.h
index 016edbd4aa7957a15578df719f9348b6ebf91c05..0a2bb83573f7cde8809c8ce2feb3325d56fd80dd 100644
--- a/skia/ext/vector_platform_device_linux.h
+++ b/skia/ext/vector_platform_device_linux.h
@@ -12,6 +12,15 @@
namespace skia {
+class SkVectorPlatformDeviceFactory : public SkRasterDeviceFactory {
+ public:
+ virtual SkDevice* newDevice(SkBitmap::Config config, int width, int height,
+ bool isOpaque, bool isForLayer);
+
+ static SkDevice* CreateDevice(cairo_t* context, int width, int height,
+ bool isOpaque);
+};
+
// This device is basically a wrapper that provides a surface for SkCanvas
// to draw into. It is basically an adaptor which converts skia APIs into
// cooresponding Cairo APIs and outputs to a Cairo surface. Please NOTE that
@@ -24,6 +33,10 @@ class VectorPlatformDevice : public PlatformDevice {
int width, int height);
virtual ~VectorPlatformDevice();
+ virtual SkDeviceFactory* getDeviceFactory() {
+ return SkNEW(SkVectorPlatformDeviceFactory);
+ }
+
virtual bool IsVectorial() { return true; }
virtual PlatformSurface beginPlatformPaint() { return context_; }
« no previous file with comments | « skia/ext/vector_platform_device.h ('k') | skia/ext/vector_platform_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698