diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 16:36:31 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 16:36:31 +0000 |
commit | 66a34ea9eb8fef66ff12aec1643dcc8868aeac3c (patch) | |
tree | d3d88ef8e5617d0c27ca58ea260ce80be2cc466d /content | |
parent | 41b335044a58cf95759078a19a22f075783b93d3 (diff) | |
download | chromium_src-66a34ea9eb8fef66ff12aec1643dcc8868aeac3c.zip chromium_src-66a34ea9eb8fef66ff12aec1643dcc8868aeac3c.tar.gz chromium_src-66a34ea9eb8fef66ff12aec1643dcc8868aeac3c.tar.bz2 |
Use macro to simplify gpu driver bug workaround defs and code.
BUG=226789
TEST=no logic change, simply code refactor, so everything stays the same
Review URL: https://codereview.chromium.org/13400003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/gpu/gpu_driver_bug_list.cc | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/content/browser/gpu/gpu_driver_bug_list.cc b/content/browser/gpu/gpu_driver_bug_list.cc index d8ed706..9ab93f2 100644 --- a/content/browser/gpu/gpu_driver_bug_list.cc +++ b/content/browser/gpu/gpu_driver_bug_list.cc @@ -31,38 +31,9 @@ GpuDriverBugList* GpuDriverBugList::Create() { GpuDriverBugList* list = new GpuDriverBugList(); const DriverBugInfo kFeatureList[] = { - { gpu::CLEAR_ALPHA_IN_READPIXELS, "clear_alpha_in_readpixels" }, - { gpu::CLEAR_UNIFORMS_BEFORE_PROGRAM_USE, - "clear_uniforms_before_program_use" }, - { gpu::DELETE_INSTEAD_OF_RESIZE_FBO, "delete_instead_of_resize_fbo" }, - { gpu::DISABLE_ANGLE_FRAMEBUFFER_MULTISAMPLE, - "disable_angle_framebuffer_multisample" }, - { gpu::DISABLE_DEPTH_TEXTURE, "disable_depth_texture" }, - { gpu::DISABLE_EXT_OCCLUSION_QUERY, "disable_ext_occlusion_query" }, - { gpu::ENABLE_CHROMIUM_FAST_NPOT_MO8_TEXTURES, - "enable_chromium_fast_npot_mo8_textures" }, - { gpu::EXIT_ON_CONTEXT_LOST, "exit_on_context_lost" }, - { gpu::FLUSH_ON_CONTEXT_SWITCH, "flush_on_context_switch" }, - { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024, - "max_cube_map_texture_size_limit_1024" }, - { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_4096, - "max_cube_map_texture_size_limit_4096" }, - { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_512, - "max_cube_map_texture_size_limit_512" }, - { gpu::MAX_TEXTURE_SIZE_LIMIT_4096, "max_texture_size_limit_4096" }, - { gpu::NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION, - "needs_glsl_built_in_function_emulation" }, - { gpu::NEEDS_OFFSCREEN_BUFFER_WORKAROUND, - "needs_offscreen_buffer_workaround" }, - { gpu::RESTORE_SCISSOR_ON_FBO_CHANGE, "restore_scissor_on_fbo_change" }, - { gpu::REVERSE_POINT_SPRITE_COORD_ORIGIN, - "reverse_point_sprite_coord_origin" }, - { gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP, - "set_texture_filter_before_generating_mipmap" }, - { gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS, - "use_client_side_arrays_for_stream_buffers" }, - { gpu::USE_CURRENT_PROGRAM_AFTER_SUCCESSFUL_LINK, - "use_current_program_after_successful_link" } +#define GPU_OP(type, name) { gpu::type, #name }, + GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) +#undef GPU_OP }; DCHECK_EQ(static_cast<int>(arraysize(kFeatureList)), gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES); |