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

Side by Side Diff: content/browser/gpu/gpu_driver_bug_list.cc

Issue 13400003: Use macro to simplify gpu driver bug workaround defs and code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/gpu_driver_bug_list.h" 5 #include "content/browser/gpu/gpu_driver_bug_list.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h" 9 #include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h"
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 GpuDriverBugList::~GpuDriverBugList() { 26 GpuDriverBugList::~GpuDriverBugList() {
27 } 27 }
28 28
29 // static 29 // static
30 GpuDriverBugList* GpuDriverBugList::Create() { 30 GpuDriverBugList* GpuDriverBugList::Create() {
31 GpuDriverBugList* list = new GpuDriverBugList(); 31 GpuDriverBugList* list = new GpuDriverBugList();
32 32
33 const DriverBugInfo kFeatureList[] = { 33 const DriverBugInfo kFeatureList[] = {
34 { gpu::CLEAR_ALPHA_IN_READPIXELS, "clear_alpha_in_readpixels" }, 34 #define GPU_OP(type, name) { gpu::type, #name },
35 { gpu::CLEAR_UNIFORMS_BEFORE_PROGRAM_USE, 35 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
36 "clear_uniforms_before_program_use" }, 36 #undef GPU_OP
37 { gpu::DELETE_INSTEAD_OF_RESIZE_FBO, "delete_instead_of_resize_fbo" },
38 { gpu::DISABLE_ANGLE_FRAMEBUFFER_MULTISAMPLE,
39 "disable_angle_framebuffer_multisample" },
40 { gpu::DISABLE_DEPTH_TEXTURE, "disable_depth_texture" },
41 { gpu::DISABLE_EXT_OCCLUSION_QUERY, "disable_ext_occlusion_query" },
42 { gpu::ENABLE_CHROMIUM_FAST_NPOT_MO8_TEXTURES,
43 "enable_chromium_fast_npot_mo8_textures" },
44 { gpu::EXIT_ON_CONTEXT_LOST, "exit_on_context_lost" },
45 { gpu::FLUSH_ON_CONTEXT_SWITCH, "flush_on_context_switch" },
46 { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024,
47 "max_cube_map_texture_size_limit_1024" },
48 { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_4096,
49 "max_cube_map_texture_size_limit_4096" },
50 { gpu::MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_512,
51 "max_cube_map_texture_size_limit_512" },
52 { gpu::MAX_TEXTURE_SIZE_LIMIT_4096, "max_texture_size_limit_4096" },
53 { gpu::NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION,
54 "needs_glsl_built_in_function_emulation" },
55 { gpu::NEEDS_OFFSCREEN_BUFFER_WORKAROUND,
56 "needs_offscreen_buffer_workaround" },
57 { gpu::RESTORE_SCISSOR_ON_FBO_CHANGE, "restore_scissor_on_fbo_change" },
58 { gpu::REVERSE_POINT_SPRITE_COORD_ORIGIN,
59 "reverse_point_sprite_coord_origin" },
60 { gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP,
61 "set_texture_filter_before_generating_mipmap" },
62 { gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS,
63 "use_client_side_arrays_for_stream_buffers" },
64 { gpu::USE_CURRENT_PROGRAM_AFTER_SUCCESSFUL_LINK,
65 "use_current_program_after_successful_link" }
66 }; 37 };
67 DCHECK_EQ(static_cast<int>(arraysize(kFeatureList)), 38 DCHECK_EQ(static_cast<int>(arraysize(kFeatureList)),
68 gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES); 39 gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES);
69 for (int i = 0; i < gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; ++i) { 40 for (int i = 0; i < gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; ++i) {
70 list->AddSupportedFeature(kFeatureList[i].feature_name, 41 list->AddSupportedFeature(kFeatureList[i].feature_name,
71 kFeatureList[i].feature_type); 42 kFeatureList[i].feature_type);
72 } 43 }
73 return list; 44 return list;
74 } 45 }
75 46
76 } // namespace content 47 } // namespace content
77 48
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698