| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "gpu/ipc/service/image_transport_surface_overlay_mac.h" | 8 #include "gpu/ipc/service/image_transport_surface_overlay_mac.h" |
| 9 #include "gpu/ipc/service/pass_through_image_transport_surface.h" | 9 #include "gpu/ipc/service/pass_through_image_transport_surface.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 gfx::SwapResult DRTSurfaceOSMesa::SwapBuffers() { | 34 gfx::SwapResult DRTSurfaceOSMesa::SwapBuffers() { |
| 35 return gfx::SwapResult::SWAP_ACK; | 35 return gfx::SwapResult::SWAP_ACK; |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool g_allow_os_mesa = false; | 38 bool g_allow_os_mesa = false; |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 // static | 42 // static |
| 43 scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( | 43 scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( |
| 44 GpuChannelManager* manager, | |
| 45 base::WeakPtr<ImageTransportSurfaceDelegate> delegate, | 44 base::WeakPtr<ImageTransportSurfaceDelegate> delegate, |
| 46 SurfaceHandle surface_handle, | 45 SurfaceHandle surface_handle, |
| 47 gl::GLSurface::Format format) { | 46 gl::GLSurface::Format format) { |
| 48 DCHECK_NE(surface_handle, kNullSurfaceHandle); | 47 DCHECK_NE(surface_handle, kNullSurfaceHandle); |
| 49 | 48 |
| 50 switch (gl::GetGLImplementation()) { | 49 switch (gl::GetGLImplementation()) { |
| 51 case gl::kGLImplementationDesktopGL: | 50 case gl::kGLImplementationDesktopGL: |
| 52 case gl::kGLImplementationDesktopGLCoreProfile: | 51 case gl::kGLImplementationDesktopGLCoreProfile: |
| 53 case gl::kGLImplementationAppleGL: | 52 case gl::kGLImplementationAppleGL: |
| 54 return make_scoped_refptr<gl::GLSurface>( | 53 return make_scoped_refptr<gl::GLSurface>( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 70 new PassThroughImageTransportSurface(delegate, surface.get())); | 69 new PassThroughImageTransportSurface(delegate, surface.get())); |
| 71 } | 70 } |
| 72 } | 71 } |
| 73 | 72 |
| 74 // static | 73 // static |
| 75 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { | 74 void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) { |
| 76 g_allow_os_mesa = allow; | 75 g_allow_os_mesa = allow; |
| 77 } | 76 } |
| 78 | 77 |
| 79 } // namespace gpu | 78 } // namespace gpu |
| OLD | NEW |