Index: skia/ext/bitmap_platform_device_linux.h |
diff --git a/skia/ext/bitmap_platform_device_linux.h b/skia/ext/bitmap_platform_device_linux.h |
index d26c50d72a7faebcd3dfa93f5cf199b22028727b..12aa96d48c29e389de074ac5c372091375441364 100644 |
--- a/skia/ext/bitmap_platform_device_linux.h |
+++ b/skia/ext/bitmap_platform_device_linux.h |
@@ -47,12 +47,13 @@ namespace skia { |
// to store the backing buffer. This buffer is BGRA in memory (on little-endian |
// machines). |
// |
-// For now we are also using Cairo to paint to the Drawables so we provide an |
-// accessor for getting the surface. |
+// The caller may optionally provide a handle to a real X Drawable surface; |
+// this is only necessary for plugins. |
// |
-// This is all quite ok for test_shell. In the future we will want to use |
-// shared memory between the renderer and the main process at least. In this |
-// case we'll probably create the buffer from a precreated region of memory. |
+// For now we are also using Cairo to paint to the Drawables so we |
+// provide an accessor for getting the surface. |
+// TODO(agl): document how the new BackingStore-based drawing code |
+// path in the browser works in relation to this. |
// ----------------------------------------------------------------------------- |
class BitmapPlatformDeviceLinux : public PlatformDeviceLinux { |
// A reference counted cairo surface |
@@ -79,14 +80,23 @@ class BitmapPlatformDeviceLinux : public PlatformDeviceLinux { |
virtual ~BitmapPlatformDeviceLinux(); |
BitmapPlatformDeviceLinux& operator=(const BitmapPlatformDeviceLinux& other); |
- // A stub copy constructor. Needs to be properly implemented. |
- BitmapPlatformDeviceLinux(const BitmapPlatformDeviceLinux& other); |
- |
// Bitmaps aren't vector graphics. |
virtual bool IsVectorial() { return false; } |
+ // See comment in platform_device_linux.h. |
+ virtual XDrawable GetXDrawable(); |
+ |
cairo_surface_t* surface() const; |
+ // A stub copy constructor. Needs to be properly implemented. |
+ BitmapPlatformDeviceLinux(const BitmapPlatformDeviceLinux& other); |
+ |
+ protected: |
+ // Flushes the pixmap (if any) 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); |
+ |
private: |
scoped_refptr<BitmapPlatformDeviceLinuxData> data_; |
}; |