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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "content/common/gpu/image_transport_surface.h" | 7 #include "content/common/gpu/image_transport_surface.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/win/windows_version.h" | 14 #include "base/win/windows_version.h" |
15 #include "content/common/gpu/gpu_messages.h" | 15 #include "content/common/gpu/gpu_messages.h" |
16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
17 #include "third_party/angle/include/EGL/egl.h" | 17 #include "third_party/angle/include/EGL/egl.h" |
18 #include "ui/gfx/gl/gl_bindings.h" | |
19 #include "ui/gfx/gl/gl_context.h" | |
20 #include "ui/gfx/gl/gl_implementation.h" | |
21 #include "ui/gfx/gl/gl_surface_egl.h" | |
22 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/gl/gl_bindings.h" |
| 20 #include "ui/gl/gl_context.h" |
| 21 #include "ui/gl/gl_implementation.h" |
| 22 #include "ui/gl/gl_surface_egl.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 // We are backed by an Pbuffer offscreen surface through which ANGLE provides | 26 // We are backed by an Pbuffer offscreen surface through which ANGLE provides |
27 // a handle to the corresponding render target texture through an extension. | 27 // a handle to the corresponding render target texture through an extension. |
28 class PbufferImageTransportSurface | 28 class PbufferImageTransportSurface |
29 : public gfx::GLSurfaceAdapter, | 29 : public gfx::GLSurfaceAdapter, |
30 public ImageTransportSurface, | 30 public ImageTransportSurface, |
31 public base::SupportsWeakPtr<PbufferImageTransportSurface> { | 31 public base::SupportsWeakPtr<PbufferImageTransportSurface> { |
32 public: | 32 public: |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 handle.transport); | 228 handle.transport); |
229 } | 229 } |
230 | 230 |
231 if (surface->Initialize()) | 231 if (surface->Initialize()) |
232 return surface; | 232 return surface; |
233 else | 233 else |
234 return NULL; | 234 return NULL; |
235 } | 235 } |
236 | 236 |
237 #endif // ENABLE_GPU | 237 #endif // ENABLE_GPU |
OLD | NEW |