Skip to content

Commit

Permalink
Make it possible to test command buffer decoder functions with extens…
Browse files Browse the repository at this point in the history
…ion flags

Make it possible to test command buffer decoder functions even if they
have extension_flags specified in the function info.

Create new files for these autogenerated unit tests:
  gles2_cmd_decoder_unittest_extensions{.cc,_autogen.h}.

Does not add any new unit tests, as the existing functions have manually
written tests that cover what current autogenerator can produce.

The idea is that for each new extension_flag function one would write a
new unit test class in gles2_cmd_decoder_unittest_extensions.cc. The
class initialize the decoder with the needed extensions, so that the
feature flag controlling the function would be enabled.

Changes the way the unit test class name is defined in
build_gles2_cmd_buffer.py. Now the class is parametrized by
the top-level function that writes out the service unit tests.
Thus it's not possible to use CWriter classes 'file number' property.
Instead, pass the name in the substitution dict. Define that the
methods generating service unittests accept varying number of
substitution dicts.

This is useful for supporting extensions such as upcoming
CHROMIUM_path_rendering, so that more of the decoder function unit tests
can be autogenerated.

BUG=344330

Review URL: https://codereview.chromium.org/473853002

Cr-Commit-Position: refs/heads/master@{#290794}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290794 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
kkinnunen@nvidia.com committed Aug 20, 2014
1 parent 03f5aa8 commit 6ab34cf
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 86 deletions.
1 change: 1 addition & 0 deletions gpu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ test("gpu_unittests") {
"command_buffer/service/gles2_cmd_decoder_unittest_base.h",
"command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_programs.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_textures.cc",
Expand Down
Loading

0 comments on commit 6ab34cf

Please sign in to comment.