Chromium Code Reviews| Index: skia/ext/platform_device.h |
| diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h |
| index 69efb3f723356896f234cf0ae767a804ffc060ca..7d18b2fb1b037fae22ed0624592e2cc750c23ac0 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 { |
|
reed1
2012/09/24 21:04:01
I don't know the naming patterns for enums in Chro
|
| public: |
| + enum PlatformPaint { |
| + // |
| + // PlatformPaint Support |
| + // |
| + // Platform specific paint operations can not be used to draw on the |
| + // given canvas. BeginPlatformPaint will return NULL PlatformSurface. |
| + UNSUPPORTED = 0, |
| + |
| + // Platform specific paint operations can be used to draw on the given |
| + // canvas without causing an intermediate bitmap to be created. |
| + 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. |
| + 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 |