summaryrefslogtreecommitdiffstats
path: root/skia/ext/vector_platform_device_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'skia/ext/vector_platform_device_linux.h')
-rw-r--r--skia/ext/vector_platform_device_linux.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/skia/ext/vector_platform_device_linux.h b/skia/ext/vector_platform_device_linux.h
index 016edbd..0a2bb83 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_; }