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_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "ui/gfx/surface/transport_dib.h" | 32 #include "ui/gfx/surface/transport_dib.h" |
33 | 33 |
34 #if defined(OS_MACOSX) | 34 #if defined(OS_MACOSX) |
35 #include "ui/gfx/surface/accelerated_surface_mac.h" | 35 #include "ui/gfx/surface/accelerated_surface_mac.h" |
36 #endif | 36 #endif |
37 | 37 |
38 class GpuChannel; | 38 class GpuChannel; |
39 struct GpuMemoryAllocation; | 39 struct GpuMemoryAllocation; |
40 class GpuWatchdog; | 40 class GpuWatchdog; |
41 | 41 |
| 42 namespace gpu { |
| 43 namespace gles2 { |
| 44 class MailboxManager; |
| 45 } |
| 46 } |
| 47 |
42 // This Base class is used to expose methods of GpuCommandBufferStub used for | 48 // This Base class is used to expose methods of GpuCommandBufferStub used for |
43 // testability. | 49 // testability. |
44 class CONTENT_EXPORT GpuCommandBufferStubBase { | 50 class CONTENT_EXPORT GpuCommandBufferStubBase { |
45 public: | 51 public: |
46 struct CONTENT_EXPORT SurfaceState { | 52 struct CONTENT_EXPORT SurfaceState { |
47 int32 surface_id; | 53 int32 surface_id; |
48 bool visible; | 54 bool visible; |
49 base::TimeTicks last_used_time; | 55 base::TimeTicks last_used_time; |
50 | 56 |
51 SurfaceState(int32 surface_id, | 57 SurfaceState(int32 surface_id, |
(...skipping 29 matching lines...) Expand all Loading... |
81 ~DestructionObserver() {} | 87 ~DestructionObserver() {} |
82 | 88 |
83 // Called in Destroy(), before the context/surface are released. | 89 // Called in Destroy(), before the context/surface are released. |
84 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; | 90 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; |
85 }; | 91 }; |
86 | 92 |
87 GpuCommandBufferStub( | 93 GpuCommandBufferStub( |
88 GpuChannel* channel, | 94 GpuChannel* channel, |
89 GpuCommandBufferStub* share_group, | 95 GpuCommandBufferStub* share_group, |
90 const gfx::GLSurfaceHandle& handle, | 96 const gfx::GLSurfaceHandle& handle, |
| 97 gpu::gles2::MailboxManager* mailbox_manager, |
91 const gfx::Size& size, | 98 const gfx::Size& size, |
92 const gpu::gles2::DisallowedFeatures& disallowed_features, | 99 const gpu::gles2::DisallowedFeatures& disallowed_features, |
93 const std::string& allowed_extensions, | 100 const std::string& allowed_extensions, |
94 const std::vector<int32>& attribs, | 101 const std::vector<int32>& attribs, |
95 gfx::GpuPreference gpu_preference, | 102 gfx::GpuPreference gpu_preference, |
96 int32 route_id, | 103 int32 route_id, |
97 int32 surface_id, | 104 int32 surface_id, |
98 GpuWatchdog* watchdog, | 105 GpuWatchdog* watchdog, |
99 bool software); | 106 bool software); |
100 | 107 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; | 252 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; |
246 | 253 |
247 ObserverList<DestructionObserver> destruction_observers_; | 254 ObserverList<DestructionObserver> destruction_observers_; |
248 | 255 |
249 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 256 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
250 }; | 257 }; |
251 | 258 |
252 #endif // defined(ENABLE_GPU) | 259 #endif // defined(ENABLE_GPU) |
253 | 260 |
254 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 261 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |