summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/webplugin_proxy.h
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 18:04:06 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 18:04:06 +0000
commit8b4755fa086ef5d41e6a6ed40a38ac45390b9511 (patch)
tree555a11c1fdaee95ebfb29cdfb9a7a2a7cce9a3c1 /chrome/plugin/webplugin_proxy.h
parent56bf1b7944f2c7b2a620b0e1476086b7e60f0da6 (diff)
downloadchromium_src-8b4755fa086ef5d41e6a6ed40a38ac45390b9511.zip
chromium_src-8b4755fa086ef5d41e6a6ed40a38ac45390b9511.tar.gz
chromium_src-8b4755fa086ef5d41e6a6ed40a38ac45390b9511.tar.bz2
Enable the invalidating Core Animation plugin drawing model on 10.5
This also adds a layer of abstraction between the concept of the accelerated surface, and our cross-process implementation (which is something we needed to fix in general, but was necessary here to avoid bleeding TransportDIB references into code that's not supposed to know about process separation). There's no in-process implementation since we don't support in-process plugins on the Mac, but the abstraction is now there if we want to add one in the future. BUG=32012 TEST=Plugins using invalidating Core Animation model should run on 10.5 Review URL: http://codereview.chromium.org/3449023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/webplugin_proxy.h')
-rw-r--r--chrome/plugin/webplugin_proxy.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index b390261..2134bf3 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -28,6 +28,9 @@
class PluginChannel;
class WebPluginDelegateImpl;
+#if defined(OS_MACOSX)
+class WebPluginAcceleratedSurfaceProxy;
+#endif
// This is an implementation of WebPlugin that proxies all calls to the
// renderer.
@@ -139,11 +142,35 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
#if defined(OS_MACOSX)
virtual void BindFakePluginWindowHandle(bool opaque);
+
+ virtual webkit_glue::WebPluginAcceleratedSurface* GetAcceleratedSurface();
+
+ // Tell the browser (via the renderer) to invalidate because the
+ // accelerated buffers have changed.
virtual void AcceleratedFrameBuffersDidSwap(gfx::PluginWindowHandle window);
+
+ // Tell the renderer and browser to associate the given plugin handle with
+ // |accelerated_surface_identifier|. The geometry is used to resize any
+ // native "window" (which on the Mac is a just a view).
+ // This method is used when IOSurface support is available.
virtual void SetAcceleratedSurface(gfx::PluginWindowHandle window,
- int32 width,
- int32 height,
+ const gfx::Size& size,
uint64 accelerated_surface_identifier);
+
+ // Tell the renderer and browser to associate the given plugin handle with
+ // |dib_handle|. The geometry is used to resize any native "window" (which
+ // on the Mac is just a view).
+ // This method is used when IOSurface support is not available.
+ virtual void SetAcceleratedDIB(
+ gfx::PluginWindowHandle window,
+ const gfx::Size& size,
+ const TransportDIB::Handle& dib_handle);
+
+ // Create/destroy TranportDIBs via messages to the browser process.
+ // These are only used when IOSurface support is not available.
+ virtual void AllocSurfaceDIB(const size_t size,
+ TransportDIB::Handle* dib_handle);
+ virtual void FreeSurfaceDIB(TransportDIB::Id dib_id);
#endif
private:
@@ -181,6 +208,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
scoped_ptr<TransportDIB> background_dib_;
scoped_cftyperef<CGContextRef> windowless_context_;
scoped_cftyperef<CGContextRef> background_context_;
+ scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
#else
scoped_ptr<skia::PlatformCanvas> windowless_canvas_;
scoped_ptr<skia::PlatformCanvas> background_canvas_;