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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/buffer_manager.h
diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h
index 33df818647966ed15770dcbe77aa83e0f05e2e55..04623d91755af97fb58d1845779d29942e667be0 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -126,6 +126,16 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> {
GLenum type_;
};
+ struct MaxValue {
+ GLuint max_value_;
+ GLuint max_value_pr_enabled_;
+
+ MaxValue (GLuint value, GLuint value_enabled)
+ : max_value_(value),
+ max_value_pr_enabled_(value_enabled) {
+ }
+ };
+
~Buffer();
GLenum initial_target() const {
@@ -196,7 +206,7 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> {
scoped_ptr<MappedRange> mapped_range_;
// A map of ranges to the highest value in that range of a certain type.
- typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap;
+ typedef std::map<Range, MaxValue, Range::Less> RangeToMaxValueMap;
RangeToMaxValueMap range_set_;
};
@@ -275,6 +285,8 @@ class GPU_EXPORT BufferManager : public base::trace_event::MemoryDumpProvider {
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
+ void SetPrimitiveRestartState(bool enabled);
+
private:
friend class Buffer;
friend class TestHelper; // Needs access to DoBufferData.
@@ -326,6 +338,8 @@ class GPU_EXPORT BufferManager : public base::trace_event::MemoryDumpProvider {
// Allows to check no Buffer will outlive this.
unsigned int buffer_count_;
+ bool primitive_restart_enabled_;
+
bool have_context_;
bool use_client_side_arrays_for_stream_buffers_;
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698