| OLD | NEW |
| 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 #include "ui/gl/init/gl_factory.h" |
| 9 | 9 |
| 10 namespace gpu { | 10 namespace gpu { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( | 13 scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( |
| 14 GpuChannelManager* manager, | 14 GpuChannelManager* manager, |
| 15 GpuCommandBufferStub* stub, | 15 GpuCommandBufferStub* stub, |
| 16 SurfaceHandle surface_handle, | 16 SurfaceHandle surface_handle, |
| 17 gfx::GLSurface::Format format) { | 17 gl::GLSurface::Format format) { |
| 18 DCHECK_NE(surface_handle, kNullSurfaceHandle); | 18 DCHECK_NE(surface_handle, kNullSurfaceHandle); |
| 19 scoped_refptr<gfx::GLSurface> surface; | 19 scoped_refptr<gl::GLSurface> surface; |
| 20 #if defined(USE_OZONE) | 20 #if defined(USE_OZONE) |
| 21 surface = gl::init::CreateSurfacelessViewGLSurface(surface_handle); | 21 surface = gl::init::CreateSurfacelessViewGLSurface(surface_handle); |
| 22 #endif | 22 #endif |
| 23 if (!surface) | 23 if (!surface) |
| 24 surface = gl::init::CreateViewGLSurface(surface_handle); | 24 surface = gl::init::CreateViewGLSurface(surface_handle); |
| 25 if (!surface) | 25 if (!surface) |
| 26 return surface; | 26 return surface; |
| 27 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( | 27 return scoped_refptr<gl::GLSurface>( |
| 28 manager, stub, surface.get())); | 28 new PassThroughImageTransportSurface(manager, stub, surface.get())); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace gpu | 31 } // namespace gpu |
| OLD | NEW |