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

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: 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kEnableGPURasterizationChoices[] = {
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
329 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
330 cc::switches::kEnableGPURasterization, ""},
331 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
332 cc::switches::kDisableGPURasterization, ""},
333 { IDS_FLAGS_GPU_RASTERIZATION_FOR_ALL_LAYERS,
334 cc::switches::kEnableUniversalGPURasterization, ""}
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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 "enable-gpu-rasterization",
880 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, 890 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
881 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, 891 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
882 kOsAndroid, 892 kOsAndroid,
883 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization) 893 MULTI_VALUE_TYPE(kEnableGPURasterizationChoices)
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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
2421 } 2431 }
2422 2432
2423 const Experiment* GetExperiments(size_t* count) { 2433 const Experiment* GetExperiments(size_t* count) {
2424 *count = num_experiments; 2434 *count = num_experiments;
2425 return experiments; 2435 return experiments;
2426 } 2436 }
2427 2437
2428 } // namespace testing 2438 } // namespace testing
2429 2439
2430 } // namespace about_flags 2440 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698