Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1247)

Unified Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 12090051: Revert 178746 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1397/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget_fullscreen_pepper.cc
===================================================================
--- content/renderer/render_widget_fullscreen_pepper.cc (revision 179370)
+++ content/renderer/render_widget_fullscreen_pepper.cc (working copy)
@@ -139,6 +139,15 @@
}
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() {
@@ -510,21 +519,6 @@
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();
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698