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

Side by Side Diff: cc/CCSettings.cpp

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebaselined to 160422. 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 | « cc/CCSettings.h ('k') | cc/CCThreadProxy.h » ('j') | 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 "CCSettings.h" 8 #include "CCSettings.h"
9 #include "cc/switches.h" 9 #include "cc/switches.h"
10 10
11 namespace { 11 namespace {
12 static bool s_perTilePaintingEnabled = false; 12 static bool s_perTilePaintingEnabled = false;
13 static bool s_partialSwapEnabled = false; 13 static bool s_partialSwapEnabled = false;
14 static bool s_acceleratedAnimationEnabled = false; 14 static bool s_acceleratedAnimationEnabled = false;
15 static bool s_pageScalePinchZoomEnabled = false;
15 } // namespace 16 } // namespace
16 17
17 namespace cc { 18 namespace cc {
18 19
19 bool CCSettings::perTilePaintingEnabled() { return s_perTilePaintingEnabled; } 20 bool CCSettings::perTilePaintingEnabled() { return s_perTilePaintingEnabled; }
20 void CCSettings::setPerTilePaintingEnabled(bool enabled) { s_perTilePaintingEnab led = enabled; } 21 void CCSettings::setPerTilePaintingEnabled(bool enabled) { s_perTilePaintingEnab led = enabled; }
21 22
22 bool CCSettings::partialSwapEnabled() { return s_partialSwapEnabled; } 23 bool CCSettings::partialSwapEnabled() { return s_partialSwapEnabled; }
23 void CCSettings::setPartialSwapEnabled(bool enabled) { s_partialSwapEnabled = en abled; } 24 void CCSettings::setPartialSwapEnabled(bool enabled) { s_partialSwapEnabled = en abled; }
24 25
25 bool CCSettings::acceleratedAnimationEnabled() { return s_acceleratedAnimationEn abled; } 26 bool CCSettings::acceleratedAnimationEnabled() { return s_acceleratedAnimationEn abled; }
26 void CCSettings::setAcceleratedAnimationEnabled(bool enabled) { s_acceleratedAni mationEnabled = enabled; } 27 void CCSettings::setAcceleratedAnimationEnabled(bool enabled) { s_acceleratedAni mationEnabled = enabled; }
27 28
29 bool CCSettings::pageScalePinchZoomEnabled() { return s_pageScalePinchZoomEnable d; }
30 void CCSettings::setPageScalePinchZoomEnabled(bool enabled) { s_pageScalePinchZo omEnabled = enabled; }
31
28 bool CCSettings::jankInsteadOfCheckerboard() 32 bool CCSettings::jankInsteadOfCheckerboard()
29 { 33 {
30 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kJankInsteadOfC heckerboard); 34 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kJankInsteadOfC heckerboard);
31 } 35 }
32 36
33 bool CCSettings::backgroundColorInsteadOfCheckerboard() 37 bool CCSettings::backgroundColorInsteadOfCheckerboard()
34 { 38 {
35 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColo rInsteadOfCheckerboard); 39 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColo rInsteadOfCheckerboard);
36 } 40 }
37 41
38 void CCSettings::reset() 42 void CCSettings::reset()
39 { 43 {
40 s_perTilePaintingEnabled = false; 44 s_perTilePaintingEnabled = false;
41 s_partialSwapEnabled = false; 45 s_partialSwapEnabled = false;
42 s_acceleratedAnimationEnabled = false; 46 s_acceleratedAnimationEnabled = false;
47 s_pageScalePinchZoomEnabled = false;
43 } 48 }
44 49
45 } // namespace cc 50 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCSettings.h ('k') | cc/CCThreadProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698