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

Unified Diff: ui/gfx/gl/gl_surface_egl.cc

Issue 8060045: Use shared D3D9 texture to transport the compositor's backing buffer to the browser... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: ui/gfx/gl/gl_surface_egl.cc
===================================================================
--- ui/gfx/gl/gl_surface_egl.cc (revision 106500)
+++ ui/gfx/gl/gl_surface_egl.cc (working copy)
@@ -307,8 +307,33 @@
return size_;
}
+bool PbufferGLSurfaceEGL::Resize(const gfx::Size& size) {
+ if (size == size_)
+ return true;
+
+ Destroy();
+ size_ = size;
+ return Initialize();
+}
+
EGLSurface PbufferGLSurfaceEGL::GetHandle() {
return surface_;
}
+void* PbufferGLSurfaceEGL::GetShareHandle() {
+ const char* extensions = eglQueryString(g_display, EGL_EXTENSIONS);
+ if (!strstr(extensions, "EGL_ANGLE_query_surface_pointer"))
+ return NULL;
+
+ void* handle;
+ if (!eglQuerySurfacePointerANGLE(g_display,
+ GetHandle(),
+ EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE,
+ &handle)) {
+ return NULL;
+ }
+
+ return handle;
+}
+
} // namespace gfx
« gpu/DEPS ('K') | « ui/gfx/gl/gl_surface_egl.h ('k') | ui/gfx/gl/gl_surface_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698