Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "CCSettings.h" | 7 #include "CCSettings.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | |
| 10 #include "content/public/common/content_switches.h" | |
| 11 | |
| 9 namespace { | 12 namespace { |
| 10 static bool s_perTilePaintingEnabled = false; | 13 static bool s_perTilePaintingEnabled = false; |
| 11 static bool s_partialSwapEnabled = false; | 14 static bool s_partialSwapEnabled = false; |
| 12 static bool s_acceleratedAnimationEnabled = false; | 15 static bool s_acceleratedAnimationEnabled = false; |
| 13 } // namespace | 16 } // namespace |
| 14 | 17 |
| 15 namespace cc { | 18 namespace cc { |
| 16 | 19 |
| 17 bool CCSettings::perTilePaintingEnabled() { return s_perTilePaintingEnabled; } | 20 bool CCSettings::perTilePaintingEnabled() { return s_perTilePaintingEnabled; } |
| 18 void CCSettings::setPerTilePaintingEnabled(bool enabled) { s_perTilePaintingEnab led = enabled; } | 21 void CCSettings::setPerTilePaintingEnabled(bool enabled) { s_perTilePaintingEnab led = enabled; } |
| 19 | 22 |
| 20 bool CCSettings::partialSwapEnabled() { return s_partialSwapEnabled; } | 23 bool CCSettings::partialSwapEnabled() { return s_partialSwapEnabled; } |
| 21 void CCSettings::setPartialSwapEnabled(bool enabled) { s_partialSwapEnabled = en abled; } | 24 void CCSettings::setPartialSwapEnabled(bool enabled) { s_partialSwapEnabled = en abled; } |
| 22 | 25 |
| 23 bool CCSettings::acceleratedAnimationEnabled() { return s_acceleratedAnimationEn abled; } | 26 bool CCSettings::acceleratedAnimationEnabled() { return s_acceleratedAnimationEn abled; } |
| 24 void CCSettings::setAcceleratedAnimationEnabled(bool enabled) { s_acceleratedAni mationEnabled = enabled; } | 27 void CCSettings::setAcceleratedAnimationEnabled(bool enabled) { s_acceleratedAni mationEnabled = enabled; } |
| 25 | 28 |
| 29 bool CCSettings::pageScalePinchZoomEnabled() | |
| 30 { | |
| 31 return CommandLine::ForCurrentProcess()->HasSwitch( | |
| 32 switches::kEnablePinchInCompositor); | |
|
Jeff Timanus
2012/09/21 18:10:01
Using the command line directly from within CC is
| |
| 33 } | |
| 34 | |
| 26 void CCSettings::reset() | 35 void CCSettings::reset() |
| 27 { | 36 { |
| 28 s_perTilePaintingEnabled = false; | 37 s_perTilePaintingEnabled = false; |
| 29 s_partialSwapEnabled = false; | 38 s_partialSwapEnabled = false; |
| 30 s_acceleratedAnimationEnabled = false; | 39 s_acceleratedAnimationEnabled = false; |
| 31 } | 40 } |
| 32 | 41 |
| 33 } // namespace cc | 42 } // namespace cc |
| OLD | NEW |