Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 1916923004: Request context sharing via content::ContextProviderCommandBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sharegroup: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 878
881 inline bool GLES2Implementation::GetTexParameterivHelper( 879 inline bool GLES2Implementation::GetTexParameterivHelper(
882 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 880 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
883 return false; 881 return false;
884 } 882 }
885 883
886 } // namespace gles2 884 } // namespace gles2
887 } // namespace gpu 885 } // namespace gpu
888 886
889 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 887 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « content/renderer/webgraphicscontext3d_provider_impl.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698