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

Unified Diff: cc/settings.cc

Issue 11361223: cc: Remove cc::settings, move them to LayerTreeSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-unittests Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/settings.h ('k') | cc/software_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/settings.cc
diff --git a/cc/settings.cc b/cc/settings.cc
deleted file mode 100644
index e4bb0b0b106e10cd8e39a633742a7e3fd6fd1326..0000000000000000000000000000000000000000
--- a/cc/settings.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "cc/settings.h"
-#include "cc/switches.h"
-
-namespace {
-static bool s_settingsInitialized = false;
-
-static bool s_perTilePaintingEnabled = false;
-static bool s_partialSwapEnabled = false;
-static bool s_acceleratedAnimationEnabled = false;
-static bool s_pageScalePinchZoomEnabled = false;
-static bool s_backgroundColorInsteadOfCheckerboard = false;
-static bool s_traceOverdraw = false;
-
-void reset()
-{
- s_settingsInitialized = true;
-
- s_perTilePaintingEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnablePerTilePainting);
- s_partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnablePartialSwap);
- s_acceleratedAnimationEnabled = !CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kDisableThreadedAnimation);
- s_pageScalePinchZoomEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnablePinchInCompositor);
- s_backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
- s_traceOverdraw = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kTraceOverdraw);
-}
-
-}
-
-namespace cc {
-
-bool Settings::perTilePaintingEnabled()
-{
- if (!s_settingsInitialized)
- reset();
- return s_perTilePaintingEnabled;
-}
-
-bool Settings::partialSwapEnabled()
-{
- if (!s_settingsInitialized)
- reset();
- return s_partialSwapEnabled;
-}
-
-bool Settings::acceleratedAnimationEnabled()
-{
- if (!s_settingsInitialized)
- reset();
- return s_acceleratedAnimationEnabled;
-}
-
-bool Settings::pageScalePinchZoomEnabled()
-{
- if (!s_settingsInitialized)
- reset();
- return s_pageScalePinchZoomEnabled;
-}
-
-bool Settings::backgroundColorInsteadOfCheckerboard()
-{
- if (!s_settingsInitialized)
- reset();
- return s_backgroundColorInsteadOfCheckerboard;
-}
-
-bool Settings::traceOverdraw()
-{
- if (!s_settingsInitialized)
- reset();
- return s_traceOverdraw;
-}
-
-void Settings::resetForTest()
-{
- reset();
-}
-
-void Settings::setPartialSwapEnabled(bool enabled)
-{
- if (!s_settingsInitialized)
- reset();
- s_partialSwapEnabled = enabled;
-}
-
-void Settings::setPerTilePaintingEnabled(bool enabled)
-{
- if (!s_settingsInitialized)
- reset();
- s_partialSwapEnabled = enabled;
-}
-
-void Settings::setAcceleratedAnimationEnabled(bool enabled)
-{
- if (!s_settingsInitialized)
- reset();
- s_acceleratedAnimationEnabled = enabled;
-}
-
-void Settings::setPageScalePinchZoomEnabled(bool enabled)
-{
- if (!s_settingsInitialized)
- reset();
- s_pageScalePinchZoomEnabled = enabled;
-}
-
-} // namespace cc
« no previous file with comments | « cc/settings.h ('k') | cc/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698