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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.h

Issue 1783763002: [WebGL 2] primitive restart should be always enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a TODO for emulation of primitive restart, will work on it soon Created 4 years, 9 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_SERVICE_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // Tells whether a buffer that is emulated using client-side arrays should be 268 // Tells whether a buffer that is emulated using client-side arrays should be
269 // set to a non-zero size. 269 // set to a non-zero size.
270 bool UseNonZeroSizeForClientSideArrayBuffer(); 270 bool UseNonZeroSizeForClientSideArrayBuffer();
271 271
272 Buffer* GetBufferInfoForTarget(ContextState* state, GLenum target) const; 272 Buffer* GetBufferInfoForTarget(ContextState* state, GLenum target) const;
273 273
274 // base::trace_event::MemoryDumpProvider implementation. 274 // base::trace_event::MemoryDumpProvider implementation.
275 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, 275 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
276 base::trace_event::ProcessMemoryDump* pmd) override; 276 base::trace_event::ProcessMemoryDump* pmd) override;
277 277
278 void SetPrimitiveRestartState(bool enabled);
279
278 private: 280 private:
279 friend class Buffer; 281 friend class Buffer;
280 friend class TestHelper; // Needs access to DoBufferData. 282 friend class TestHelper; // Needs access to DoBufferData.
281 friend class BufferManagerTestBase; // Needs access to DoBufferSubData. 283 friend class BufferManagerTestBase; // Needs access to DoBufferSubData.
282 284
283 void StartTracking(Buffer* buffer); 285 void StartTracking(Buffer* buffer);
284 void StopTracking(Buffer* buffer); 286 void StopTracking(Buffer* buffer);
285 287
286 // Does a glBufferSubData and updates the approriate accounting. 288 // Does a glBufferSubData and updates the approriate accounting.
287 // Assumes the values have already been validated. 289 // Assumes the values have already been validated.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Whether or not buffers can be bound to multiple targets. 321 // Whether or not buffers can be bound to multiple targets.
320 bool allow_buffers_on_multiple_targets_; 322 bool allow_buffers_on_multiple_targets_;
321 323
322 // Whether or not allow using GL_FIXED type for vertex attribs. 324 // Whether or not allow using GL_FIXED type for vertex attribs.
323 bool allow_fixed_attribs_; 325 bool allow_fixed_attribs_;
324 326
325 // Counts the number of Buffer allocated with 'this' as its manager. 327 // Counts the number of Buffer allocated with 'this' as its manager.
326 // Allows to check no Buffer will outlive this. 328 // Allows to check no Buffer will outlive this.
327 unsigned int buffer_count_; 329 unsigned int buffer_count_;
328 330
331 bool primitive_restart_enabled_;
332
329 bool have_context_; 333 bool have_context_;
330 bool use_client_side_arrays_for_stream_buffers_; 334 bool use_client_side_arrays_for_stream_buffers_;
331 335
332 DISALLOW_COPY_AND_ASSIGN(BufferManager); 336 DISALLOW_COPY_AND_ASSIGN(BufferManager);
333 }; 337 };
334 338
335 } // namespace gles2 339 } // namespace gles2
336 } // namespace gpu 340 } // namespace gpu
337 341
338 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 342 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | gpu/command_buffer/service/buffer_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698