Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: skia/ext/bitmap_platform_device_linux.h

Issue 39105: Windowless plugins: basic drawing works. (Closed)
Patch Set: retry Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_linux.cc » ('j') | webkit/glue/plugins/plugin_instance.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_linux.cc » ('j') | webkit/glue/plugins/plugin_instance.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698