Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
index c9c6b8fc91189351b5113458a41d836edc237653..3b334907c30a8918ef796a257e0d521dc41a403a 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
@@ -343,6 +343,12 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder { |
DebugMarkerManager debug_marker_manager_; |
Logger logger_; |
+#define GLES2_CMD_OP(name) \ |
+ Error Handle##name(uint32_t immediate_data_size, const void* data); |
+ |
+ GLES2_COMMAND_LIST(GLES2_CMD_OP) |
+#undef GLES2_CMD_OP |
+ |
using CmdHandler = |
Error (GLES2DecoderPassthroughImpl::*)(uint32_t immediate_data_size, |
const void* data); |
@@ -368,10 +374,23 @@ class GLES2DecoderPassthroughImpl : public GLES2Decoder { |
// The ContextGroup for this decoder uses to track resources. |
scoped_refptr<ContextGroup> group_; |
scoped_refptr<FeatureInfo> feature_info_; |
+ |
+// Include the prototypes of all the doer functions from a separate header to |
+// keep this file clean. |
+#include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h" |
}; |
+#define GLES2_CMD_OP(name) \ |
+ { \ |
+ &GLES2DecoderPassthroughImpl::Handle##name, cmds::name::kArgFlags, \ |
+ cmds::name::cmd_flags, \ |
+ sizeof(cmds::name) / sizeof(CommandBufferEntry) - 1, \ |
+ }, /* NOLINT */ |
+ |
const GLES2DecoderPassthroughImpl::CommandInfo |
- GLES2DecoderPassthroughImpl::command_info[] = {}; |
+ GLES2DecoderPassthroughImpl::command_info[] = { |
+ GLES2_COMMAND_LIST(GLES2_CMD_OP)}; |
+#undef GLES2_CMD_OP |
GLES2Decoder* CreateGLES2DecoderPassthroughImpl(ContextGroup* group) { |
return new GLES2DecoderPassthroughImpl(group); |
@@ -379,3 +398,6 @@ GLES2Decoder* CreateGLES2DecoderPassthroughImpl(ContextGroup* group) { |
} // namespace gles2 |
} // namespace gpu |
+ |
+#include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.h" |
+#include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.h" |