| Index: skia/ext/platform_device.h
|
| diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h
|
| index 69efb3f723356896f234cf0ae767a804ffc060ca..625c5d1bdb71dde634714c21fa578362d3af4d56 100644
|
| --- a/skia/ext/platform_device.h
|
| +++ b/skia/ext/platform_device.h
|
| @@ -96,6 +96,26 @@ SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
|
| // provide to allow for drawing by the native platform into the device.
|
| class SK_API PlatformDevice {
|
| public:
|
| + enum PlatformPaint {
|
| + //
|
| + // PlatformPaint Support
|
| + //
|
| + // Platform specific paint operations can not be used to draw on the
|
| + // given canvas. BeginPlatformPaint will return NULL PlatformSurface.
|
| + PLATFORM_PAINT_UNSUPPORTED,
|
| +
|
| + // Platform specific paint operations can be used to draw on the given
|
| + // canvas without causing an intermediate bitmap to be created.
|
| + PLATFORM_PAINT_DIRECT,
|
| +
|
| + // Platform specific paint operations can be used to draw on the given
|
| + // canvas but it might cause an intermediate bitmap to be created.
|
| + // Allocating and setting up an intermediate bitmap can be expensive.
|
| + // It is recommended to avoid using platform paint if possible when
|
| + // platform paint support is indirect.
|
| + PLATFORM_PAINT_INDIRECT
|
| + };
|
| +
|
| virtual ~PlatformDevice() {}
|
|
|
| #if defined(OS_MACOSX)
|
| @@ -121,8 +141,8 @@ class SK_API PlatformDevice {
|
| virtual void DrawToNativeContext(PlatformSurface surface, int x, int y,
|
| const PlatformRect* src_rect) = 0;
|
|
|
| - // Returns true if GDI operations can be used for drawing into the bitmap.
|
| - virtual bool SupportsPlatformPaint();
|
| + // Returns support for platform specific paint operations.
|
| + virtual PlatformPaint PlatformPaintSupport();
|
|
|
| #if defined(OS_WIN)
|
| // Loads a SkPath into the GDI context. The path can there after be used for
|
|
|