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

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: rebase Created 4 years, 6 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 908fbda052b65b547a0d9b54d42eba1857da2f9c..48f372e4ade7d39f84507193db85f5f318eb5df1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -268,23 +268,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) {
@@ -2681,7 +2664,7 @@ GLenum BackFramebuffer::CheckStatus() {
GLES2Decoder* GLES2Decoder::Create(ContextGroup* group) {
if (group->gpu_preferences().use_passthrough_cmd_decoder) {
- return CreateGLES2DecoderPassthroughImpl(group);
+ return new GLES2DecoderPassthroughImpl(group);
}
return new GLES2DecoderImpl(group);
}
« no previous file with comments | « gpu/command_buffer/service/common_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698