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

Unified Diff: content/browser/renderer_host/accelerated_surface_container_linux.cc

Issue 8591006: Reland 110355 - Use shared D3D9 texture to transport the compositor's backing buffer to the brows... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
Index: content/browser/renderer_host/accelerated_surface_container_linux.cc
===================================================================
--- content/browser/renderer_host/accelerated_surface_container_linux.cc (revision 106933)
+++ content/browser/renderer_host/accelerated_surface_container_linux.cc (working copy)
@@ -169,7 +169,7 @@
// We receive a window here rather than a pixmap directly because drivers
// require (or required) that the pixmap used to create the GL texture be
// created in the same process as the texture.
- Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
+ Display* dpy = static_cast<Display*>(instance->GetDisplay());
pixmap_ = XCompositeNameWindowPixmap(dpy, *surface_id);
// Wrap the pixmap in a GLXPixmap
@@ -198,7 +198,7 @@
DCHECK(instance);
instance->MakeSharedContextCurrent();
- Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
+ Display* dpy = static_cast<Display*>(instance->GetDisplay());
if (glx_pixmap_)
glXDestroyGLXPixmap(dpy, glx_pixmap_);
if (pixmap_)
@@ -211,7 +211,7 @@
ui::SharedResources* instance = ui::SharedResources::GetInstance();
DCHECK(instance);
- Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
+ Display* dpy = static_cast<Display*>(instance->GetDisplay());
glBindTexture(GL_TEXTURE_2D, texture_id_);
glXBindTexImageEXT(dpy, glx_pixmap_, GLX_FRONT_LEFT_EXT, NULL);
@@ -228,7 +228,10 @@
if (initialized)
return true;
- Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
+ ui::SharedResources* instance = ui::SharedResources::GetInstance();
+ DCHECK(instance);
+
+ Display* dpy = static_cast<Display*>(instance->GetDisplay());
int event_base, error_base;
if (XCompositeQueryExtension(dpy, &event_base, &error_base)) {
int major = 0, minor = 2;
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/browser/renderer_host/render_widget_host_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698