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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 566019: Implements glGetUniformiv and glGetUniformfv. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_format.h
===================================================================
--- gpu/command_buffer/common/gles2_cmd_format.h (revision 37873)
+++ gpu/command_buffer/common/gles2_cmd_format.h (working copy)
@@ -40,10 +40,22 @@
T GetDataAs() {
return static_cast<T>(static_cast<void*>(&data));
}
+
+ // Returns the size of the SizedResult for a given size of result.
+ static size_t GetSize(size_t size_of_result) {
+ return size_of_result + sizeof(uint32); // NOLINT
+ }
+
uint32 size; // in bytes.
int32 data; // this is just here to get an offset.
};
+COMPILE_ASSERT(sizeof(SizedResult) == 8, SizedResult_size_not_8);
+COMPILE_ASSERT(offsetof(SizedResult, size) == 0,
+ OffsetOf_SizedResult_size_not_0);
+COMPILE_ASSERT(offsetof(SizedResult, data) == 4,
+ OffsetOf_SizedResult_data_not_4);
+
#include "gpu/command_buffer/common/gles2_cmd_format_autogen.h"
// These are hand written commands.
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698