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: cc/settings.cc

Issue 11238063: Fix initialisation of s_acceleratedAnimationEnabled flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "config.h" 5 #include "config.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/settings.h" 8 #include "cc/settings.h"
9 #include "cc/switches.h" 9 #include "cc/switches.h"
10 10
11 namespace { 11 namespace {
12 static bool s_settingsInitialized = false; 12 static bool s_settingsInitialized = false;
13 13
14 static bool s_perTilePaintingEnabled = false; 14 static bool s_perTilePaintingEnabled = false;
15 static bool s_partialSwapEnabled = false; 15 static bool s_partialSwapEnabled = false;
16 static bool s_acceleratedAnimationEnabled = false; 16 static bool s_acceleratedAnimationEnabled = false;
17 static bool s_pageScalePinchZoomEnabled = false; 17 static bool s_pageScalePinchZoomEnabled = false;
18 static bool s_jankInsteadOfCheckerboard = false; 18 static bool s_jankInsteadOfCheckerboard = false;
19 static bool s_backgroundColorInsteadOfCheckerboard = false; 19 static bool s_backgroundColorInsteadOfCheckerboard = false;
20 20
21 void reset() 21 void reset()
22 { 22 {
23 s_settingsInitialized = true; 23 s_settingsInitialized = true;
24 24
25 s_perTilePaintingEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::s witches::kEnablePerTilePainting); 25 s_perTilePaintingEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::s witches::kEnablePerTilePainting);
26 s_partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switc hes::kEnablePartialSwap); 26 s_partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switc hes::kEnablePartialSwap);
27 s_acceleratedAnimationEnabled = CommandLine::ForCurrentProcess()->HasSwitch( cc::switches::kDisableThreadedAnimation); 27 s_acceleratedAnimationEnabled = !CommandLine::ForCurrentProcess()->HasSwitch (cc::switches::kDisableThreadedAnimation);
28 s_pageScalePinchZoomEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc ::switches::kEnablePinchInCompositor); 28 s_pageScalePinchZoomEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc ::switches::kEnablePinchInCompositor);
29 s_jankInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(cc ::switches::kJankInsteadOfCheckerboard); 29 s_jankInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(cc ::switches::kJankInsteadOfCheckerboard);
30 s_backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->H asSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 30 s_backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->H asSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
31 } 31 }
32 32
33 } 33 }
34 34
35 namespace cc { 35 namespace cc {
36 36
37 bool Settings::perTilePaintingEnabled() 37 bool Settings::perTilePaintingEnabled()
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 void Settings::setPageScalePinchZoomEnabled(bool enabled) 105 void Settings::setPageScalePinchZoomEnabled(bool enabled)
106 { 106 {
107 if (!s_settingsInitialized) 107 if (!s_settingsInitialized)
108 reset(); 108 reset();
109 s_pageScalePinchZoomEnabled = enabled; 109 s_pageScalePinchZoomEnabled = enabled;
110 } 110 }
111 111
112 } // namespace cc 112 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698