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

Side by Side Diff: gpu/ipc/service/image_transport_surface_linux.cc

Issue 1920163005: Split //ui/gl into //ui/gl + //ui/gi/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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
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 "gpu/ipc/service/image_transport_surface.h" 5 #include "gpu/ipc/service/image_transport_surface.h"
6 6
7 #include "gpu/ipc/service/pass_through_image_transport_surface.h" 7 #include "gpu/ipc/service/pass_through_image_transport_surface.h"
8 #include "ui/gl/init/gl_factory.h"
8 9
9 namespace gpu { 10 namespace gpu {
10 11
11 // static 12 // static
12 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( 13 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
13 GpuChannelManager* manager, 14 GpuChannelManager* manager,
14 GpuCommandBufferStub* stub, 15 GpuCommandBufferStub* stub,
15 SurfaceHandle surface_handle, 16 SurfaceHandle surface_handle,
16 gfx::GLSurface::Format format) { 17 gfx::GLSurface::Format format) {
17 DCHECK_NE(surface_handle, kNullSurfaceHandle); 18 DCHECK_NE(surface_handle, kNullSurfaceHandle);
18 scoped_refptr<gfx::GLSurface> surface; 19 scoped_refptr<gfx::GLSurface> surface;
19 #if defined(USE_OZONE) 20 #if defined(USE_OZONE)
20 surface = gfx::GLSurface::CreateSurfacelessViewGLSurface(surface_handle); 21 surface = gl::init::CreateSurfacelessViewGLSurface(surface_handle);
21 #endif 22 #endif
22 if (!surface) 23 if (!surface)
23 surface = gfx::GLSurface::CreateViewGLSurface(surface_handle); 24 surface = gl::init::CreateViewGLSurface(surface_handle);
24 if (!surface) 25 if (!surface)
25 return surface; 26 return surface;
26 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( 27 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
27 manager, stub, surface.get())); 28 manager, stub, surface.get()));
28 } 29 }
29 30
30 } // namespace gpu 31 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | gpu/ipc/service/image_transport_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698