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

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

Issue 181063022: cc: Trigger GPU rasterization based on a per-layer hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move flags to RenderThreadImpl 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // an option to switch off its debugging. 192 // an option to switch off its debugging.
193 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS, 193 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
194 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" }, 194 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
195 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, 195 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
196 switches::kNaClDebugMask, "*://*/*debug.nmf" } 196 switches::kNaClDebugMask, "*://*/*debug.nmf" }
197 }; 197 };
198 198
199 const Experiment::Choice kImplSidePaintingChoices[] = { 199 const Experiment::Choice kImplSidePaintingChoices[] = {
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 200 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
201 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 201 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
202 cc::switches::kEnableImplSidePainting, ""}, 202 switches::kEnableImplSidePainting, ""},
203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
204 cc::switches::kDisableImplSidePainting, ""} 204 switches::kDisableImplSidePainting, ""}
205 }; 205 };
206 206
207 const Experiment::Choice kLCDTextChoices[] = { 207 const Experiment::Choice kLCDTextChoices[] = {
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
209 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""}, 209 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
210 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""} 210 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
211 }; 211 };
212 212
213 const Experiment::Choice kDelegatedRendererChoices[] = { 213 const Experiment::Choice kDelegatedRendererChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
216 switches::kEnableDelegatedRenderer, ""}, 216 switches::kEnableDelegatedRenderer, ""},
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
218 switches::kDisableDelegatedRenderer, ""} 218 switches::kDisableDelegatedRenderer, ""}
219 }; 219 };
220 220
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 290 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
291 switches::kEnableOverlayScrollbar, ""}, 291 switches::kEnableOverlayScrollbar, ""},
292 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 292 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
293 switches::kDisableOverlayScrollbar, ""} 293 switches::kDisableOverlayScrollbar, ""}
294 }; 294 };
295 #endif 295 #endif
296 296
297 const Experiment::Choice kMapImageChoices[] = { 297 const Experiment::Choice kMapImageChoices[] = {
298 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 298 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
299 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 299 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
300 cc::switches::kEnableMapImage, ""}, 300 switches::kEnableMapImage, ""},
301 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 301 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
302 cc::switches::kDisableMapImage, ""} 302 switches::kDisableMapImage, ""}
303 }; 303 };
304 304
305 #if defined(OS_ANDROID) 305 #if defined(OS_ANDROID)
306 const Experiment::Choice kZeroSuggestExperimentsChoices[] = { 306 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
307 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 307 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
308 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, 308 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
309 switches::kEnableZeroSuggestMostVisited, ""}, 309 switches::kEnableZeroSuggestMostVisited, ""},
310 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, 310 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
311 switches::kEnableZeroSuggestEtherSerp, ""}, 311 switches::kEnableZeroSuggestEtherSerp, ""},
312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, 312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
313 switches::kEnableZeroSuggestEtherNoSerp, ""}, 313 switches::kEnableZeroSuggestEtherNoSerp, ""},
314 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 314 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
315 switches::kDisableZeroSuggest, ""} 315 switches::kDisableZeroSuggest, ""}
316 }; 316 };
317 #endif 317 #endif
318 318
319 const Experiment::Choice kNumRasterThreadsChoices[] = { 319 const Experiment::Choice kNumRasterThreadsChoices[] = {
320 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 320 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
321 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, 321 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
322 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, 322 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
323 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, 323 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
324 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } 324 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
325 }; 325 };
326 326
327 const Experiment::Choice kRasterizationSiteChoices[] = {
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
329 { IDS_FLAGS_CPU_RASTERIZATION,
330 switches::kRasterizationSite, "cpu" },
331 { IDS_FLAGS_HYBRID_RASTERIZATION,
332 switches::kRasterizationSite, "hybrid" },
333 { IDS_FLAGS_GPU_RASTERIZATION,
334 switches::kRasterizationSite, "gpu" },
335 };
336
327 // We're using independent flags here (as opposed to a common flag with 337 // We're using independent flags here (as opposed to a common flag with
328 // different values) to be able to enable/disable the entire experience 338 // different values) to be able to enable/disable the entire experience
329 // associated with this feature server-side from the FieldTrial (the complete 339 // associated with this feature server-side from the FieldTrial (the complete
330 // experience includes other flag changes as well). It is not currently possible 340 // experience includes other flag changes as well). It is not currently possible
331 // to do that with "flag=value" flags. 341 // to do that with "flag=value" flags.
332 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { 342 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
333 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 343 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
334 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
335 switches::kDisableSearchButtonInOmnibox, ""}, 345 switches::kDisableSearchButtonInOmnibox, ""},
336 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, 346 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, 879 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
870 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, 880 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
871 #if defined(ENABLE_SWIFTSHADER) 881 #if defined(ENABLE_SWIFTSHADER)
872 kOsAll, 882 kOsAll,
873 #else 883 #else
874 0, 884 0,
875 #endif 885 #endif
876 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) 886 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
877 }, 887 },
878 { 888 {
879 "enable-gpu-rasterization", 889 "rasterization-site",
880 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, 890 IDS_FLAGS_RASTERIZATION_SITE_NAME,
881 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, 891 IDS_FLAGS_RASTERIZATION_SITE_DESCRIPTION,
882 kOsAndroid, 892 kOsAndroid,
883 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization) 893 MULTI_VALUE_TYPE(kRasterizationSiteChoices)
884 }, 894 },
885 { 895 {
886 "enable-experimental-web-platform-features", 896 "enable-experimental-web-platform-features",
887 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, 897 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
888 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, 898 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
889 kOsAll, 899 kOsAll,
890 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) 900 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
891 }, 901 },
892 { 902 {
893 "disable-ntp-other-sessions-menu", 903 "disable-ntp-other-sessions-menu",
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 } 2430 }
2421 2431
2422 const Experiment* GetExperiments(size_t* count) { 2432 const Experiment* GetExperiments(size_t* count) {
2423 *count = num_experiments; 2433 *count = num_experiments;
2424 return experiments; 2434 return experiments;
2425 } 2435 }
2426 2436
2427 } // namespace testing 2437 } // namespace testing
2428 2438
2429 } // namespace about_flags 2439 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698