| 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 // Out of order because it has conflicts with other includes on Windows. | 9 // Out of order because it has conflicts with other includes on Windows. |
| 10 #include "third_party/angle/include/EGL/egl.h" | 10 #include "third_party/angle/include/EGL/egl.h" |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
| 18 #include "content/common/gpu/gpu_messages.h" | 18 #include "content/common/gpu/gpu_messages.h" |
| 19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "content/common/gpu/texture_image_transport_surface.h" | 20 #include "content/common/gpu/texture_image_transport_surface.h" |
| 21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 22 #include "ui/gl/gl_bindings.h" | 22 #include "ui/gl/gl_bindings.h" |
| 23 #include "ui/gl/gl_context.h" | 23 #include "ui/gl/gl_context.h" |
| 24 #include "ui/gl/gl_implementation.h" | 24 #include "ui/gl/gl_implementation.h" |
| 25 #include "ui/gl/gl_surface_egl.h" | 25 #include "ui/gl/gl_surface_egl.h" |
| 26 | 26 |
| 27 namespace content { |
| 27 namespace { | 28 namespace { |
| 28 | 29 |
| 29 // We are backed by an Pbuffer offscreen surface through which ANGLE provides | 30 // We are backed by an Pbuffer offscreen surface through which ANGLE provides |
| 30 // a handle to the corresponding render target texture through an extension. | 31 // a handle to the corresponding render target texture through an extension. |
| 31 class PbufferImageTransportSurface | 32 class PbufferImageTransportSurface |
| 32 : public gfx::GLSurfaceAdapter, | 33 : public gfx::GLSurfaceAdapter, |
| 33 public ImageTransportSurface, | 34 public ImageTransportSurface, |
| 34 public base::SupportsWeakPtr<PbufferImageTransportSurface> { | 35 public base::SupportsWeakPtr<PbufferImageTransportSurface> { |
| 35 public: | 36 public: |
| 36 PbufferImageTransportSurface(GpuChannelManager* manager, | 37 PbufferImageTransportSurface(GpuChannelManager* manager, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 handle.transport); | 279 handle.transport); |
| 279 } | 280 } |
| 280 } | 281 } |
| 281 | 282 |
| 282 if (surface->Initialize()) | 283 if (surface->Initialize()) |
| 283 return surface; | 284 return surface; |
| 284 else | 285 else |
| 285 return NULL; | 286 return NULL; |
| 286 } | 287 } |
| 287 | 288 |
| 289 } // namespace content |
| 290 |
| 288 #endif // ENABLE_GPU | 291 #endif // ENABLE_GPU |
| OLD | NEW |