| 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/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/common/gpu/gpu_messages.h" | 11 #include "content/common/gpu/gpu_messages.h" |
| 12 #include "ui/gfx/gl/gl_bindings.h" |
| 12 #include "ui/gfx/gl/gl_context.h" | 13 #include "ui/gfx/gl/gl_context.h" |
| 13 #include "ui/gfx/gl/gl_bindings.h" | |
| 14 #include "ui/gfx/gl/gl_implementation.h" | 14 #include "ui/gfx/gl/gl_implementation.h" |
| 15 #include "ui/gfx/gl/gl_surface_cgl.h" | 15 #include "ui/gfx/gl/gl_surface_cgl.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/gfx/surface/io_surface_support_mac.h" | 17 #include "ui/surface/io_surface_support_mac.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // We are backed by an offscreen surface for the purposes of creating | 21 // We are backed by an offscreen surface for the purposes of creating |
| 22 // a context, but use FBOs to render to texture backed IOSurface | 22 // a context, but use FBOs to render to texture backed IOSurface |
| 23 class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL, | 23 class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL, |
| 24 public ImageTransportSurface { | 24 public ImageTransportSurface { |
| 25 public: | 25 public: |
| 26 IOSurfaceImageTransportSurface(GpuChannelManager* manager, | 26 IOSurfaceImageTransportSurface(GpuChannelManager* manager, |
| 27 GpuCommandBufferStub* stub, | 27 GpuCommandBufferStub* stub, |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 NOTREACHED(); | 366 NOTREACHED(); |
| 367 return NULL; | 367 return NULL; |
| 368 } | 368 } |
| 369 if (surface->Initialize()) | 369 if (surface->Initialize()) |
| 370 return surface; | 370 return surface; |
| 371 else | 371 else |
| 372 return NULL; | 372 return NULL; |
| 373 } | 373 } |
| 374 | 374 |
| 375 #endif // defined(USE_GPU) | 375 #endif // defined(USE_GPU) |
| OLD | NEW |