summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_widget_fullscreen_pepper.h
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 05:13:19 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 05:13:19 +0000
commit8c9e0a0c767f8f5d0d5504fe906ad44ee4b7fd91 (patch)
treedffee487b3f51ff7987f03f7c5e77bb3c864ac96 /content/renderer/render_widget_fullscreen_pepper.h
parent3d0e98cee42dfd10e07460d712bc048f53f161d3 (diff)
downloadchromium_src-8c9e0a0c767f8f5d0d5504fe906ad44ee4b7fd91.zip
chromium_src-8c9e0a0c767f8f5d0d5504fe906ad44ee4b7fd91.tar.gz
chromium_src-8c9e0a0c767f8f5d0d5504fe906ad44ee4b7fd91.tar.bz2
Merged ContentGLContext into WebGraphicsContext3DCommandBufferImpl
This allows WebGraphicsContext3DCommandBufferImpl to accept CommandBufferProxy's directly. Once PpapiCommandBufferProxy inherits from CommandBufferProxy, WebGraphcsContext3DCommandBufferImpl will be able to accept it and operate over a pepper channel. BUG=120279 TEST=manually Review URL: http://codereview.chromium.org/9800001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget_fullscreen_pepper.h')
-rw-r--r--content/renderer/render_widget_fullscreen_pepper.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h
index 1597f8f..a91dfa2 100644
--- a/content/renderer/render_widget_fullscreen_pepper.h
+++ b/content/renderer/render_widget_fullscreen_pepper.h
@@ -6,12 +6,15 @@
#define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_
#include "base/memory/weak_ptr.h"
-#include "content/common/gpu/client/content_gl_context.h"
+#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/renderer/pepper/pepper_parent_context_provider.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"
+class WebGraphicsContext3DCommandBufferImpl;
+
namespace webkit {
namespace ppapi {
@@ -23,15 +26,22 @@ class PluginInstance;
// A RenderWidget that hosts a fullscreen pepper plugin. This provides a
// FullscreenContainer that the plugin instance can callback into to e.g.
// invalidate rects.
-class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen,
- public webkit::ppapi::FullscreenContainer,
- public PepperParentContextProvider {
+class RenderWidgetFullscreenPepper :
+ public RenderWidgetFullscreen,
+ public webkit::ppapi::FullscreenContainer,
+ public PepperParentContextProvider,
+ public WebGraphicsContext3DSwapBuffersClient {
public:
static RenderWidgetFullscreenPepper* Create(
int32 opener_id,
webkit::ppapi::PluginInstance* plugin,
const GURL& active_url);
+ // WebGraphicscontext3DSwapBuffersClient implementation
+ virtual void OnViewContextSwapBuffersPosted() OVERRIDE;
+ virtual void OnViewContextSwapBuffersComplete() OVERRIDE;
+ virtual void OnViewContextSwapBuffersAborted() OVERRIDE;
+
// pepper::FullscreenContainer API.
virtual void Invalidate() OVERRIDE;
virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE;
@@ -41,7 +51,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen,
virtual webkit::ppapi::PluginDelegate::PlatformContext3D*
CreateContext3D() OVERRIDE;
- ContentGLContext* context() const { return context_; }
+ WebGraphicsContext3DCommandBufferImpl* context() const { return context_; }
void SwapBuffers();
// Could be NULL when this widget is closing.
@@ -83,15 +93,9 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen,
// and notify the browser.
bool CheckCompositing();
- // Called when the compositing context gets lost.
- void OnLostContext(ContentGLContext::ContextLostReason);
-
- // Binding of ContentGLContext swapbuffers callback to
- // RenderWidget::OnSwapBuffersCompleted.
- void OnSwapBuffersCompleteByContentGLContext();
-
// Implementation of PepperParentContextProvider.
- virtual ContentGLContext* GetParentContextForPlatformContext3D() OVERRIDE;
+ virtual WebGraphicsContext3DCommandBufferImpl*
+ GetParentContextForPlatformContext3D() OVERRIDE;
// URL that is responsible for this widget, passed to ggl::CreateViewContext.
GURL active_url_;
@@ -100,7 +104,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen,
webkit::ppapi::PluginInstance* plugin_;
// GL context for compositing.
- ContentGLContext* context_;
+ WebGraphicsContext3DCommandBufferImpl* context_;
unsigned int buffer_;
unsigned int program_;