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 GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
7 | 7 |
8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 uint32 InsertSyncPoint() override; | 118 uint32 InsertSyncPoint() override; |
119 uint32 InsertFutureSyncPoint() override; | 119 uint32 InsertFutureSyncPoint() override; |
120 void RetireSyncPoint(uint32 sync_point) override; | 120 void RetireSyncPoint(uint32 sync_point) override; |
121 void SignalSyncPoint(uint32 sync_point, | 121 void SignalSyncPoint(uint32 sync_point, |
122 const base::Closure& callback) override; | 122 const base::Closure& callback) override; |
123 void SignalQuery(uint32 query, const base::Closure& callback) override; | 123 void SignalQuery(uint32 query, const base::Closure& callback) override; |
124 void SetSurfaceVisible(bool visible) override; | 124 void SetSurfaceVisible(bool visible) override; |
125 uint32 CreateStreamTexture(uint32 texture_id) override; | 125 uint32 CreateStreamTexture(uint32 texture_id) override; |
126 void SetLock(base::Lock*) override; | 126 void SetLock(base::Lock*) override; |
127 bool IsGpuChannelLost() override; | 127 bool IsGpuChannelLost() override; |
| 128 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 129 uint64_t GetCommandBufferID() const override; |
128 | 130 |
129 private: | 131 private: |
130 void PumpCommands(); | 132 void PumpCommands(); |
131 bool GetBufferChanged(int32 transfer_buffer_id); | 133 bool GetBufferChanged(int32 transfer_buffer_id); |
132 void SetupBaseContext(); | 134 void SetupBaseContext(); |
133 | 135 |
134 scoped_refptr<gles2::MailboxManager> mailbox_manager_; | 136 scoped_refptr<gles2::MailboxManager> mailbox_manager_; |
135 scoped_refptr<gfx::GLShareGroup> share_group_; | 137 scoped_refptr<gfx::GLShareGroup> share_group_; |
136 scoped_ptr<CommandBufferService> command_buffer_; | 138 scoped_ptr<CommandBufferService> command_buffer_; |
137 scoped_ptr<gles2::GLES2Decoder> decoder_; | 139 scoped_ptr<gles2::GLES2Decoder> decoder_; |
138 scoped_ptr<GpuScheduler> gpu_scheduler_; | 140 scoped_ptr<GpuScheduler> gpu_scheduler_; |
139 scoped_refptr<gfx::GLSurface> surface_; | 141 scoped_refptr<gfx::GLSurface> surface_; |
140 scoped_refptr<gfx::GLContext> context_; | 142 scoped_refptr<gfx::GLContext> context_; |
141 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; | 143 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; |
142 scoped_ptr<TransferBuffer> transfer_buffer_; | 144 scoped_ptr<TransferBuffer> transfer_buffer_; |
143 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; | 145 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; |
144 bool context_lost_allowed_; | 146 bool context_lost_allowed_; |
145 | 147 |
146 // Used on Android to virtualize GL for all contexts. | 148 // Used on Android to virtualize GL for all contexts. |
147 static int use_count_; | 149 static int use_count_; |
148 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 150 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
149 static scoped_refptr<gfx::GLSurface>* base_surface_; | 151 static scoped_refptr<gfx::GLSurface>* base_surface_; |
150 static scoped_refptr<gfx::GLContext>* base_context_; | 152 static scoped_refptr<gfx::GLContext>* base_context_; |
151 }; | 153 }; |
152 | 154 |
153 } // namespace gpu | 155 } // namespace gpu |
154 | 156 |
155 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 157 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
OLD | NEW |