| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/bind.h" | |
| 8 #include "base/command_line.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "base/win/windows_version.h" | |
| 13 #include "content/common/gpu/child_window_surface_win.h" | 7 #include "content/common/gpu/child_window_surface_win.h" |
| 14 #include "content/common/gpu/gpu_messages.h" | |
| 15 #include "content/common/gpu/pass_through_image_transport_surface.h" | 8 #include "content/common/gpu/pass_through_image_transport_surface.h" |
| 16 #include "content/public/common/content_switches.h" | |
| 17 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 18 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
| 19 #include "ui/gl/gl_context.h" | |
| 20 #include "ui/gl/gl_implementation.h" | 11 #include "ui/gl/gl_implementation.h" |
| 21 #include "ui/gl/gl_surface_egl.h" | 12 #include "ui/gl/gl_surface_egl.h" |
| 22 #include "ui/gl/vsync_provider_win.h" | 13 #include "ui/gl/vsync_provider_win.h" |
| 23 | 14 |
| 24 namespace content { | 15 namespace content { |
| 25 | 16 |
| 26 // static | 17 // static |
| 27 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( | 18 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( |
| 28 GpuChannelManager* manager, | 19 GpuChannelManager* manager, |
| 29 GpuCommandBufferStub* stub, | 20 GpuCommandBufferStub* stub, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 47 surface = gfx::GLSurface::CreateViewGLSurface(surface_handle); | 38 surface = gfx::GLSurface::CreateViewGLSurface(surface_handle); |
| 48 if (!surface) | 39 if (!surface) |
| 49 return nullptr; | 40 return nullptr; |
| 50 } | 41 } |
| 51 | 42 |
| 52 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( | 43 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( |
| 53 manager, stub, surface.get())); | 44 manager, stub, surface.get())); |
| 54 } | 45 } |
| 55 | 46 |
| 56 } // namespace content | 47 } // namespace content |
| OLD | NEW |