| Index: skia/ext/vector_platform_device_cairo_linux.h
|
| ===================================================================
|
| --- skia/ext/vector_platform_device_cairo_linux.h (revision 91504)
|
| +++ skia/ext/vector_platform_device_cairo_linux.h (working copy)
|
| @@ -14,6 +14,17 @@
|
|
|
| namespace skia {
|
|
|
| +class SK_API VectorPlatformDeviceCairoFactory : public SkDeviceFactory {
|
| + public:
|
| + static PlatformDevice* CreateDevice(cairo_t* context, int width, int height,
|
| + bool isOpaque);
|
| +
|
| + // Overridden from SkDeviceFactory:
|
| + virtual SkDevice* newDevice(SkCanvas* ignored, SkBitmap::Config config,
|
| + int width, int height,
|
| + bool isOpaque, bool isForLayer);
|
| +};
|
| +
|
| // 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
|
| @@ -23,8 +34,9 @@
|
| public:
|
| virtual ~VectorPlatformDeviceCairo();
|
|
|
| - static PlatformDevice* CreateDevice(cairo_t* context, int width, int height,
|
| - bool isOpaque);
|
| + // Factory function. Ownership of |context| is not transferred.
|
| + static VectorPlatformDeviceCairo* create(PlatformSurface context,
|
| + int width, int height);
|
|
|
| // Clean up cached fonts. It is an error to call this while some
|
| // VectorPlatformDeviceCairo callee is still using fonts created for it by
|
| @@ -76,9 +88,8 @@
|
| explicit VectorPlatformDeviceCairo(PlatformSurface context,
|
| const SkBitmap& bitmap);
|
|
|
| - virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width,
|
| - int height, bool isOpaque,
|
| - Usage usage);
|
| + // Override from SkDevice (through PlatformDevice).
|
| + virtual SkDeviceFactory* onNewDeviceFactory();
|
|
|
| private:
|
| // Apply paint's color in the context.
|
|
|