diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 11:24:46 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 11:24:46 +0000 |
commit | 9f2bed6f665da5636e9456c6b8df4456952e31ac (patch) | |
tree | 82c0698e71be1674da2fee1aecf3a791aec18850 /content/renderer/render_widget_fullscreen_pepper.h | |
parent | 0ccf578fc6a98c730e7ab93ee2f37a43e808e4d2 (diff) | |
download | chromium_src-9f2bed6f665da5636e9456c6b8df4456952e31ac.zip chromium_src-9f2bed6f665da5636e9456c6b8df4456952e31ac.tar.gz chromium_src-9f2bed6f665da5636e9456c6b8df4456952e31ac.tar.bz2 |
Switch RenderWidgetFullscreenPepper to use RenderWidget's compositor
This saves some fair amount of code, gets us a bunch of compositor goodness, and
basically simplifies pepper's hook to the compositor.
BUG=164095
Review URL: https://chromiumcodereview.appspot.com/12796006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget_fullscreen_pepper.h')
-rw-r--r-- | content/renderer/render_widget_fullscreen_pepper.h | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h index 3f0fefa..164be03 100644 --- a/content/renderer/render_widget_fullscreen_pepper.h +++ b/content/renderer/render_widget_fullscreen_pepper.h @@ -6,11 +6,8 @@ #define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ #include "base/memory/scoped_ptr.h" -#include "base/memory/weak_ptr.h" -#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" #include "content/renderer/mouse_lock_dispatcher.h" #include "content/renderer/render_widget_fullscreen.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" #include "webkit/plugins/ppapi/fullscreen_container.h" @@ -23,7 +20,7 @@ class PluginInstance; } // namespace webkit namespace WebKit { -class WebGraphicsContext3D; +class WebLayer; } namespace content { @@ -51,14 +48,12 @@ class RenderWidgetFullscreenPepper : CreateContext3D() OVERRIDE; virtual void ReparentContext( webkit::ppapi::PluginDelegate::PlatformContext3D*) OVERRIDE; + virtual void SetLayer(WebKit::WebLayer* layer) OVERRIDE; // IPC::Listener implementation. This overrides the implementation // in RenderWidgetFullscreen. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - WebKit::WebGraphicsContext3D* context() const { return context_; } - void SwapBuffers(); - // Could be NULL when this widget is closing. webkit::ppapi::PluginInstance* plugin() const { return plugin_; } @@ -66,6 +61,8 @@ class RenderWidgetFullscreenPepper : return mouse_lock_dispatcher_.get(); } + bool is_compositing() const { return !!layer_; } + protected: RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, const GURL& active_url, @@ -92,34 +89,17 @@ class RenderWidgetFullscreenPepper : virtual WebKit::WebWidget* CreateWebWidget() OVERRIDE; // RenderWidget overrides. - virtual bool SupportsAsynchronousSwapBuffers() OVERRIDE; virtual GURL GetURLForGraphicsContext3D() OVERRIDE; - virtual void Composite() OVERRIDE; - virtual void OnViewContextSwapBuffersAborted() OVERRIDE; + virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE; private: - // Creates the GL context for compositing. - void CreateContext(); - - // Initialize the GL states and resources for compositing. - bool InitContext(); - - // Checks (and returns) whether accelerated compositing should be on or off, - // and notify the browser. - bool CheckCompositing(); - // URL that is responsible for this widget, passed to ggl::CreateViewContext. GURL active_url_; // The plugin instance this widget wraps. webkit::ppapi::PluginInstance* plugin_; - // GL context for compositing. - WebKit::WebGraphicsContext3D* context_; - unsigned int buffer_; - unsigned int program_; - - base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; + WebKit::WebLayer* layer_; scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |