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..1ecd1a57fb6a1b3f5ce2322e9c6e0321566bc1d1 100644 |
--- a/gpu/command_buffer/service/buffer_manager.h |
+++ b/gpu/command_buffer/service/buffer_manager.h |
@@ -63,7 +63,7 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> { |
// offset is in bytes. |
// count is in elements of type. |
bool GetMaxValueForRange(GLuint offset, GLsizei count, GLenum type, |
- GLuint* max_value); |
+ bool primitive_restart_enabled, GLuint* max_value); |
// Returns a pointer to shadowed data. |
const void* GetRange(GLintptr offset, GLsizeiptr size) const; |
@@ -101,10 +101,13 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> { |
// Represents a range in a buffer. |
class Range { |
public: |
- Range(GLuint offset, GLsizei count, GLenum type) |
+ Range(GLuint offset, GLsizei count, GLenum type, |
+ bool primitive_restart_enabled) |
: offset_(offset), |
count_(count), |
- type_(type) { |
+ type_(type), |
+ primitive_restart_enabled_( |
+ primitive_restart_enabled ? GL_TRUE : GL_FALSE) { |
piman
2016/03/19 00:56:11
nit: keep primitive_restart_enabled_ as a bool to
Ken Russell (switch to Gerrit)
2016/03/19 04:06:53
It was more straightforward in my opinion to turn
piman
2016/03/21 19:14:41
I don't care all that much, but FYI you can compar
Ken Russell (switch to Gerrit)
2016/03/21 22:22:29
Thanks, I didn't know that and should have tested
|
} |
// A less functor provided for std::map so it can find ranges. |
@@ -116,7 +119,10 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> { |
if (lhs.count_ != rhs.count_) { |
return lhs.count_ < rhs.count_; |
} |
- return lhs.type_ < rhs.type_; |
+ if (lhs.type_ != rhs.type_) { |
+ return lhs.type_ < rhs.type_; |
+ } |
+ return lhs.primitive_restart_enabled_ < rhs.primitive_restart_enabled_; |
} |
}; |
@@ -124,6 +130,7 @@ class GPU_EXPORT Buffer : public base::RefCounted<Buffer> { |
GLuint offset_; |
GLsizei count_; |
GLenum type_; |
+ GLboolean primitive_restart_enabled_; |
}; |
~Buffer(); |