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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2012533004: Add generated and hand-written passthrough command handlers with stub Doers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 81a6c97c39cdbafb0131ff997c4559199d587a66..abe97b655b37b80529903ae85079bf9f2da3c923 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -261,23 +261,6 @@ static_assert(sizeof(GLfloat) == sizeof(float), // NOLINT
// linker on Mac OS X 10.6 when the symbol ordering file is used
// namespace {
-// Returns the address of the first byte after a struct.
-template <typename T>
-const void* AddressAfterStruct(const T& pod) {
- return reinterpret_cast<const uint8_t*>(&pod) + sizeof(pod);
-}
-
-// Returns the address of the frst byte after the struct or NULL if size >
-// immediate_data_size.
-template <typename RETURN_TYPE, typename COMMAND_TYPE>
-RETURN_TYPE GetImmediateDataAs(const COMMAND_TYPE& pod,
- uint32_t size,
- uint32_t immediate_data_size) {
- return (size <= immediate_data_size) ?
- static_cast<RETURN_TYPE>(const_cast<void*>(AddressAfterStruct(pod))) :
- NULL;
-}
-
// Return true if a character belongs to the ASCII subset as defined in
// GLSL ES 1.0 spec section 3.1.
static bool CharacterIsValidForGLES(unsigned char c) {

Powered by Google App Engine
This is Rietveld 408576698