Index: skia/ext/bitmap_platform_device_win.h |
=================================================================== |
--- skia/ext/bitmap_platform_device_win.h (revision 96545) |
+++ skia/ext/bitmap_platform_device_win.h (working copy) |
@@ -25,7 +25,8 @@ |
// For us, that other bitmap will become invalid as soon as the device becomes |
// invalid, which may lead to subtle bugs. Therefore, DO NOT ASSIGN THE |
// DEVICE'S PIXEL DATA TO ANOTHER BITMAP, make sure you copy instead. |
-class SK_API BitmapPlatformDevice : public PlatformDevice { |
+class SK_API BitmapPlatformDevice : public PlatformDevice, |
+ public SkDevice::SkMatrixClipObserver { |
public: |
// Factory function. The screen DC is used to create the bitmap, and will not |
// be stored beyond this function. is_opaque should be set if the caller |
@@ -34,17 +35,17 @@ |
// The shared_section parameter is optional (pass NULL for default behavior). |
// If shared_section is non-null, then it must be a handle to a file-mapping |
// object returned by CreateFileMapping. See CreateDIBSection for details. |
- static BitmapPlatformDevice* create(HDC screen_dc, |
- int width, |
- int height, |
- bool is_opaque, |
- HANDLE shared_section); |
+ static SkDevice* create(HDC screen_dc, |
+ int width, |
+ int height, |
+ bool is_opaque, |
+ HANDLE shared_section); |
// This version is the same as above but will get the screen DC itself. |
- static BitmapPlatformDevice* create(int width, |
- int height, |
- bool is_opaque, |
- HANDLE shared_section); |
+ static SkDevice* create(int width, |
+ int height, |
+ bool is_opaque, |
+ HANDLE shared_section); |
virtual ~BitmapPlatformDevice(); |
@@ -57,20 +58,28 @@ |
virtual void DrawToNativeContext(HDC dc, int x, int y, const RECT* src_rect); |
virtual void MakeOpaque(int x, int y, int width, int height); |
+ virtual void matrixClipChanged(const SkMatrix& transform, |
+ const SkRegion& region, const SkClipStack&); |
+#if 0 |
// Loads the given transform and clipping region into the HDC. This is |
// overridden from SkDevice. |
virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, |
const SkClipStack&); |
+#endif |
protected: |
+#if 0 |
// Flushes the Windows device context so that the pixel data can be accessed |
// directly by Skia. Overridden from SkDevice, this is called when Skia |
// starts accessing pixel data. |
virtual void onAccessBitmap(SkBitmap* bitmap); |
+#endif |
+#if 0 |
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, |
int height, bool isOpaque, |
Usage usage); |
+#endif |
private: |
// Reference counted data that can be shared between multiple devices. This |
@@ -80,7 +89,8 @@ |
// Private constructor. The data should already be ref'ed for us. |
BitmapPlatformDevice(BitmapPlatformDeviceData* data, |
- const SkBitmap& bitmap); |
+ /*const SkBitmap& bitmap*/ |
+ SkDevice* device); |
// Data associated with this device, guaranteed non-null. We hold a reference |
// to this object. |