| 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 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
| 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
| 7 | 7 |
| 8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.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 "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
| 18 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
| 21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
| 22 #include "ui/gl/gl_surface.h" | 22 #include "ui/gl/gl_surface.h" |
| 23 #include "ui/surface/transport_dib.h" | 23 #include "ui/surface/transport_dib.h" |
| 24 | 24 |
| 25 class GpuChannelManager; | |
| 26 class GpuCommandBufferStub; | |
| 27 | |
| 28 struct GpuHostMsg_AcceleratedSurfaceNew_Params; | 25 struct GpuHostMsg_AcceleratedSurfaceNew_Params; |
| 29 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 26 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 30 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 27 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
| 31 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; | 28 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; |
| 32 | 29 |
| 33 namespace gfx { | 30 namespace gfx { |
| 34 class GLSurface; | 31 class GLSurface; |
| 35 } | 32 } |
| 36 | 33 |
| 37 namespace gpu { | 34 namespace gpu { |
| 38 class GpuScheduler; | 35 class GpuScheduler; |
| 39 struct RefCountedCounter; | 36 struct RefCountedCounter; |
| 40 namespace gles2 { | 37 namespace gles2 { |
| 41 class GLES2Decoder; | 38 class GLES2Decoder; |
| 42 } | 39 } |
| 43 } | 40 } |
| 44 | 41 |
| 42 namespace content { |
| 43 class GpuChannelManager; |
| 44 class GpuCommandBufferStub; |
| 45 |
| 45 // The GPU process is agnostic as to how it displays results. On some platforms | 46 // The GPU process is agnostic as to how it displays results. On some platforms |
| 46 // it renders directly to window. On others it renders offscreen and transports | 47 // it renders directly to window. On others it renders offscreen and transports |
| 47 // the results to the browser process to display. This file provides a simple | 48 // the results to the browser process to display. This file provides a simple |
| 48 // framework for making the offscreen path seem more like the onscreen path. | 49 // framework for making the offscreen path seem more like the onscreen path. |
| 49 // | 50 // |
| 50 // The ImageTransportSurface class defines an simple interface for events that | 51 // The ImageTransportSurface class defines an simple interface for events that |
| 51 // should be responded to. The factory returns an offscreen surface that looks | 52 // should be responded to. The factory returns an offscreen surface that looks |
| 52 // a lot like an onscreen surface to the GPU process. | 53 // a lot like an onscreen surface to the GPU process. |
| 53 // | 54 // |
| 54 // The ImageTransportSurfaceHelper provides some glue to the outside world: | 55 // The ImageTransportSurfaceHelper provides some glue to the outside world: |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 187 |
| 187 private: | 188 private: |
| 188 scoped_ptr<ImageTransportHelper> helper_; | 189 scoped_ptr<ImageTransportHelper> helper_; |
| 189 gfx::Size new_size_; | 190 gfx::Size new_size_; |
| 190 bool transport_; | 191 bool transport_; |
| 191 bool did_set_swap_interval_; | 192 bool did_set_swap_interval_; |
| 192 | 193 |
| 193 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 194 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
| 194 }; | 195 }; |
| 195 | 196 |
| 197 } // namespace content |
| 198 |
| 196 #endif // defined(ENABLE_GPU) | 199 #endif // defined(ENABLE_GPU) |
| 197 | 200 |
| 198 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 201 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
| OLD | NEW |