Index: gpu/command_buffer/service/indexed_buffer_binding_host.h |
diff --git a/gpu/command_buffer/service/indexed_buffer_binding_host.h b/gpu/command_buffer/service/indexed_buffer_binding_host.h |
index 3730069917f2a1ff176c102eef7f1d5281e463b1..363f75fc70d4dd1f6b89048de0e86dfe9c80448f 100644 |
--- a/gpu/command_buffer/service/indexed_buffer_binding_host.h |
+++ b/gpu/command_buffer/service/indexed_buffer_binding_host.h |
@@ -22,7 +22,9 @@ class Buffer; |
class GPU_EXPORT IndexedBufferBindingHost : |
public base::RefCounted<IndexedBufferBindingHost> { |
public: |
- // |needs_emulation| is set to true on Desktop GL 4.1 or lower. |
+ // In theory |needs_emulation| needs to be true on Desktop GL 4.1 or lower. |
+ // However, we set it to true everywhere, not to trust drivers to handle |
+ // out-of-bounds buffer accesses. |
IndexedBufferBindingHost(uint32_t max_bindings, bool needs_emulation); |
// The following two functions do state update and call the underlying GL |
@@ -89,7 +91,7 @@ class GPU_EXPORT IndexedBufferBindingHost : |
void Reset(); |
}; |
- // This is called on Desktop GL lower than 4.2, where the range |
+ // This is called when |needs_emulation_| is true, where the range |
// (offset + size) can't go beyond the buffer's size. |
static void DoAdjustedBindBufferRange( |
GLenum target, GLuint index, GLuint service_id, GLintptr offset, |