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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 189883009: Define a --force-gpu-rasterization flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // the PNaCl translator and secure shell is substituted elsewhere. 194 // the PNaCl translator and secure shell is substituted elsewhere.
195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, 195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
196 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, 196 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, 197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
198 switches::kNaClDebugMask, "*://*/*debug.nmf" } 198 switches::kNaClDebugMask, "*://*/*debug.nmf" }
199 }; 199 };
200 200
201 const Experiment::Choice kImplSidePaintingChoices[] = { 201 const Experiment::Choice kImplSidePaintingChoices[] = {
202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
203 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 203 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
204 cc::switches::kEnableImplSidePainting, ""}, 204 switches::kEnableImplSidePainting, ""},
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 205 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
206 cc::switches::kDisableImplSidePainting, ""} 206 switches::kDisableImplSidePainting, ""}
207 }; 207 };
208 208
209 const Experiment::Choice kLCDTextChoices[] = { 209 const Experiment::Choice kLCDTextChoices[] = {
210 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 210 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
211 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""}, 211 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""} 212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
213 }; 213 };
214 214
215 const Experiment::Choice kDelegatedRendererChoices[] = { 215 const Experiment::Choice kDelegatedRendererChoices[] = {
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
217 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 217 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
218 switches::kEnableDelegatedRenderer, ""}, 218 switches::kEnableDelegatedRenderer, ""},
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
220 switches::kDisableDelegatedRenderer, ""} 220 switches::kDisableDelegatedRenderer, ""}
221 }; 221 };
222 222
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 292 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
293 switches::kEnableOverlayScrollbar, ""}, 293 switches::kEnableOverlayScrollbar, ""},
294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
295 switches::kDisableOverlayScrollbar, ""} 295 switches::kDisableOverlayScrollbar, ""}
296 }; 296 };
297 #endif 297 #endif
298 298
299 const Experiment::Choice kMapImageChoices[] = { 299 const Experiment::Choice kMapImageChoices[] = {
300 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 300 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
301 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 301 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
302 cc::switches::kEnableMapImage, ""}, 302 switches::kEnableMapImage, ""},
303 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 303 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
304 cc::switches::kDisableMapImage, ""} 304 switches::kDisableMapImage, ""}
305 }; 305 };
306 306
307 #if defined(OS_ANDROID) 307 #if defined(OS_ANDROID)
308 const Experiment::Choice kZeroSuggestExperimentsChoices[] = { 308 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
309 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 309 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
310 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, 310 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
311 switches::kEnableZeroSuggestMostVisited, ""}, 311 switches::kEnableZeroSuggestMostVisited, ""},
312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, 312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
313 switches::kEnableZeroSuggestEtherSerp, ""}, 313 switches::kEnableZeroSuggestEtherSerp, ""},
314 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, 314 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
315 switches::kEnableZeroSuggestEtherNoSerp, ""}, 315 switches::kEnableZeroSuggestEtherNoSerp, ""},
316 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 316 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
317 switches::kDisableZeroSuggest, ""} 317 switches::kDisableZeroSuggest, ""}
318 }; 318 };
319 #endif 319 #endif
320 320
321 const Experiment::Choice kNumRasterThreadsChoices[] = { 321 const Experiment::Choice kNumRasterThreadsChoices[] = {
322 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 322 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
323 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, 323 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
324 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, 324 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
325 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, 325 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
326 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } 326 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
327 }; 327 };
328 328
329 const Experiment::Choice kEnableGpuRasterizationChoices[] = {
330 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
331 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
332 switches::kEnableGpuRasterization, "" },
333 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
334 switches::kDisableGpuRasterization, "" },
335 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
336 switches::kForceGpuRasterization, "" },
337 };
338
329 // We're using independent flags here (as opposed to a common flag with 339 // We're using independent flags here (as opposed to a common flag with
330 // different values) to be able to enable/disable the entire experience 340 // different values) to be able to enable/disable the entire experience
331 // associated with this feature server-side from the FieldTrial (the complete 341 // associated with this feature server-side from the FieldTrial (the complete
332 // experience includes other flag changes as well). It is not currently possible 342 // experience includes other flag changes as well). It is not currently possible
333 // to do that with "flag=value" flags. 343 // to do that with "flag=value" flags.
334 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { 344 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
335 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 345 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
336 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 346 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
337 switches::kDisableSearchButtonInOmnibox, ""}, 347 switches::kDisableSearchButtonInOmnibox, ""},
338 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, 348 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 #else 870 #else
861 0, 871 0,
862 #endif 872 #endif
863 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) 873 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
864 }, 874 },
865 { 875 {
866 "enable-gpu-rasterization", 876 "enable-gpu-rasterization",
867 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, 877 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
868 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, 878 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
869 kOsAndroid, 879 kOsAndroid,
870 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization) 880 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
871 }, 881 },
872 { 882 {
873 "enable-experimental-web-platform-features", 883 "enable-experimental-web-platform-features",
874 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, 884 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
875 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, 885 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
876 kOsAll, 886 kOsAll,
877 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) 887 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
878 }, 888 },
879 { 889 {
880 "disable-ntp-other-sessions-menu", 890 "disable-ntp-other-sessions-menu",
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 } 2417 }
2408 2418
2409 const Experiment* GetExperiments(size_t* count) { 2419 const Experiment* GetExperiments(size_t* count) {
2410 *count = num_experiments; 2420 *count = num_experiments;
2411 return experiments; 2421 return experiments;
2412 } 2422 }
2413 2423
2414 } // namespace testing 2424 } // namespace testing
2415 2425
2416 } // namespace about_flags 2426 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698