| 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_CLIENT_GLES2_IMPLEMENTATION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 static const unsigned int kAlignment = 16; | 153 static const unsigned int kAlignment = 16; |
| 154 | 154 |
| 155 // GL names for the buffers used to emulate client side buffers. | 155 // GL names for the buffers used to emulate client side buffers. |
| 156 static const GLuint kClientSideArrayId = 0xFEDCBA98u; | 156 static const GLuint kClientSideArrayId = 0xFEDCBA98u; |
| 157 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; | 157 static const GLuint kClientSideElementArrayId = 0xFEDCBA99u; |
| 158 | 158 |
| 159 // Number of swap buffers allowed before waiting. | 159 // Number of swap buffers allowed before waiting. |
| 160 static const size_t kMaxSwapBuffers = 2; | 160 static const size_t kMaxSwapBuffers = 2; |
| 161 | 161 |
| 162 GLES2Implementation(GLES2CmdHelper* helper, | 162 GLES2Implementation(GLES2CmdHelper* helper, |
| 163 ShareGroup* share_group, | 163 scoped_refptr<ShareGroup> share_group, |
| 164 TransferBufferInterface* transfer_buffer, | 164 TransferBufferInterface* transfer_buffer, |
| 165 bool bind_generates_resource, | 165 bool bind_generates_resource, |
| 166 bool lose_context_when_out_of_memory, | 166 bool lose_context_when_out_of_memory, |
| 167 bool support_client_side_arrays, | 167 bool support_client_side_arrays, |
| 168 GpuControl* gpu_control); | 168 GpuControl* gpu_control); |
| 169 | 169 |
| 170 ~GLES2Implementation() override; | 170 ~GLES2Implementation() override; |
| 171 | 171 |
| 172 bool Initialize( | 172 bool Initialize( |
| 173 unsigned int starting_transfer_buffer_size, | 173 unsigned int starting_transfer_buffer_size, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // ContextSupport implementation. | 255 // ContextSupport implementation. |
| 256 void SignalSyncToken(const gpu::SyncToken& sync_token, | 256 void SignalSyncToken(const gpu::SyncToken& sync_token, |
| 257 const base::Closure& callback) override; | 257 const base::Closure& callback) override; |
| 258 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 258 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
| 259 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; | 259 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; |
| 260 | 260 |
| 261 // base::trace_event::MemoryDumpProvider implementation. | 261 // base::trace_event::MemoryDumpProvider implementation. |
| 262 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, | 262 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 263 base::trace_event::ProcessMemoryDump* pmd) override; | 263 base::trace_event::ProcessMemoryDump* pmd) override; |
| 264 | 264 |
| 265 ShareGroup* share_group() const { | 265 const scoped_refptr<ShareGroup>& share_group() const { return share_group_; } |
| 266 return share_group_.get(); | |
| 267 } | |
| 268 | 266 |
| 269 const Capabilities& capabilities() const { | 267 const Capabilities& capabilities() const { |
| 270 return capabilities_; | 268 return capabilities_; |
| 271 } | 269 } |
| 272 | 270 |
| 273 GpuControl* gpu_control() { | 271 GpuControl* gpu_control() { |
| 274 return gpu_control_; | 272 return gpu_control_; |
| 275 } | 273 } |
| 276 | 274 |
| 277 ShareGroupContextData* share_group_context_data() { | 275 ShareGroupContextData* share_group_context_data() { |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 877 |
| 880 inline bool GLES2Implementation::GetTexParameterivHelper( | 878 inline bool GLES2Implementation::GetTexParameterivHelper( |
| 881 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 879 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
| 882 return false; | 880 return false; |
| 883 } | 881 } |
| 884 | 882 |
| 885 } // namespace gles2 | 883 } // namespace gles2 |
| 886 } // namespace gpu | 884 } // namespace gpu |
| 887 | 885 |
| 888 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 886 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
| OLD | NEW |