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