Drive compositor scheduling with the swapbuffers callback.
This modifies the compositor to hold DoDeferredUpdate until the previous frames are ack'd by the GPU.
This vastly improves rendering smoothness.
There is some complexity in the way we intercept the SwapBuffers callback due to the different types of GraphicsContexts that get scheduled by render_widget.
BUG=80480,53051
Review URL: http://codereview.chromium.org/6902106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85186 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h
index c7a235f..e83ca18 100644
--- a/content/renderer/render_widget_fullscreen_pepper.h
+++ b/content/renderer/render_widget_fullscreen_pepper.h
@@ -61,6 +61,9 @@
// RenderWidgetFullscreen API.
virtual WebKit::WebWidget* CreateWebWidget();
+ // RenderWidget overrides.
+ virtual bool SupportsAsynchronousSwapBuffers() OVERRIDE;
+
private:
// Creates the GL context for compositing.
void CreateContext();
@@ -75,6 +78,10 @@
// Called when the compositing context gets lost.
void OnLostContext();
+ // Binding of RendererGLContext swapbuffers callback to
+ // RenderWidget::OnSwapBuffersCompleted.
+ void OnSwapBuffersCompleteByRendererGLContext();
+
// URL that is responsible for this widget, passed to ggl::CreateViewContext.
GURL active_url_;