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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.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_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"

Powered by Google App Engine
This is Rietveld 408576698