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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager.h

Issue 1136713003: Add ES3 commands GetVertexAttribI{u}iv to GPU command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/vertex_attrib_manager.h
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h
index 73fa4807d6e785bfa572b7c53eab385f09696db2..b5425e0dc9cb2d33ecf75cbbf727001db2331ef6 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.h
+++ b/gpu/command_buffer/service/vertex_attrib_manager.h
@@ -65,6 +65,10 @@ class GPU_EXPORT VertexAttrib {
return divisor_;
}
+ GLboolean integer() const {
+ return integer_;
+ }
+
bool enabled() const {
return enabled_;
}
@@ -118,6 +122,10 @@ class GPU_EXPORT VertexAttrib {
divisor_ = divisor;
}
+ void SetInteger(GLboolean integer) {
+ integer_ = integer;
+ }
+
void Unbind(Buffer* buffer);
// The index of this attrib.
@@ -147,6 +155,8 @@ class GPU_EXPORT VertexAttrib {
GLsizei divisor_;
+ GLboolean integer_;
+
// Will be true if this was assigned to a client side array.
bool is_client_side_array_;
@@ -218,6 +228,13 @@ class GPU_EXPORT VertexAttribManager :
}
}
+ void SetInteger(GLuint index, GLboolean integer) {
+ VertexAttrib* attrib = GetVertexAttrib(index);
+ if (attrib) {
+ attrib->SetInteger(integer);
+ }
+ }
+
void SetElementArrayBuffer(Buffer* buffer);
Buffer* element_array_buffer() const { return element_array_buffer_.get(); }

Powered by Google App Engine
This is Rietveld 408576698