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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 // static 9 // static
10 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( 10 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
11 GpuChannelManager* manager, 11 GpuChannelManager* manager,
12 GpuCommandBufferStub* stub, 12 GpuCommandBufferStub* stub,
13 const gfx::GLSurfaceHandle& handle) { 13 const gfx::GLSurfaceHandle& handle) {
14 DCHECK(handle.handle); 14 DCHECK(handle.handle);
15 DCHECK(handle.transport_type == gfx::NATIVE_DIRECT); 15 DCHECK(handle.transport_type == gfx::NATIVE_DIRECT);
16 scoped_refptr<gfx::GLSurface> surface = 16 scoped_refptr<gfx::GLSurface> surface;
17 gfx::GLSurface::CreateViewGLSurface(handle.handle); 17 #if defined(USE_OZONE)
18 if (!surface.get()) 18 surface = gfx::GLSurface::CreateSurfacelessViewGLSurface(handle.handle);
19 #endif
20 if (!surface)
21 surface = gfx::GLSurface::CreateViewGLSurface(handle.handle);
22 if (!surface)
19 return surface; 23 return surface;
20 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( 24 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
21 manager, stub, surface.get())); 25 manager, stub, surface.get()));
22 } 26 }
23 27
24 } // namespace content 28 } // namespace content
OLDNEW
« 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