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

Unified Diff: content/common/gpu/image_transport_surface_linux.cc

Issue 938873002: Add a new API to create a surfaceless GLSurface for Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont need to modify vsync update path with synchronous swapbuffers now Created 5 years, 10 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 | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_linux.cc
diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc
index b648b197c5c525225c50bf2193605b134b3a22ed..db36efea1354052ee54e603626f6e31484aea11b 100644
--- a/content/common/gpu/image_transport_surface_linux.cc
+++ b/content/common/gpu/image_transport_surface_linux.cc
@@ -13,9 +13,13 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
const gfx::GLSurfaceHandle& handle) {
DCHECK(handle.handle);
DCHECK(handle.transport_type == gfx::NATIVE_DIRECT);
- scoped_refptr<gfx::GLSurface> surface =
- gfx::GLSurface::CreateViewGLSurface(handle.handle);
- if (!surface.get())
+ scoped_refptr<gfx::GLSurface> surface;
+#if defined(USE_OZONE)
+ surface = gfx::GLSurface::CreateSurfacelessViewGLSurface(handle.handle);
+#endif
+ if (!surface)
+ surface = gfx::GLSurface::CreateViewGLSurface(handle.handle);
+ if (!surface)
return surface;
return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
manager, stub, surface.get()));
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698