| Index: content/renderer/render_widget_fullscreen_pepper.cc
|
| diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc
|
| index 85c2b77d9c9389e97f0b10ede8e542781e26ace5..5ce6a3bbf728e49e4764b4576d0922c39d2965cf 100644
|
| --- a/content/renderer/render_widget_fullscreen_pepper.cc
|
| +++ b/content/renderer/render_widget_fullscreen_pepper.cc
|
| @@ -139,15 +139,6 @@ class PepperWidget : public WebWidget {
|
| }
|
|
|
| virtual void composite(bool finish) {
|
| - if (!widget_->plugin())
|
| - return;
|
| -
|
| - WebGraphicsContext3DCommandBufferImpl* context = widget_->context();
|
| - DCHECK(context);
|
| - unsigned int texture = widget_->plugin()->GetBackingTextureId();
|
| - context->bindTexture(GL_TEXTURE_2D, texture);
|
| - context->drawArrays(GL_TRIANGLES, 0, 3);
|
| - widget_->SwapBuffers();
|
| }
|
|
|
| virtual void themeChanged() {
|
| @@ -519,6 +510,21 @@ bool RenderWidgetFullscreenPepper::SupportsAsynchronousSwapBuffers() {
|
| return context_ != NULL;
|
| }
|
|
|
| +// Fullscreen pepper widgets composite themselves into the plugin's backing
|
| +// texture (as opposed to using the cc library to composite as normal
|
| +// content::RenderWidgets do), so to produce a composited frame we just have to
|
| +// draw this texture and swap.
|
| +void RenderWidgetFullscreenPepper::Composite() {
|
| + if (!plugin_)
|
| + return;
|
| +
|
| + DCHECK(context_);
|
| + unsigned int texture = plugin_->GetBackingTextureId();
|
| + context_->bindTexture(GL_TEXTURE_2D, texture);
|
| + context_->drawArrays(GL_TRIANGLES, 0, 3);
|
| + SwapBuffers();
|
| +}
|
| +
|
| void RenderWidgetFullscreenPepper::CreateContext() {
|
| DCHECK(!context_);
|
| CommandLine* command_line = CommandLine::ForCurrentProcess();
|
|
|