blob: cfdc25835d41e13c027e763da5c089ac85b5cd52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// 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 "config.h"
#include "base/command_line.h"
#include "CCSettings.h"
#include "cc/switches.h"
namespace {
static bool s_perTilePaintingEnabled = false;
static bool s_partialSwapEnabled = false;
static bool s_acceleratedAnimationEnabled = false;
static bool s_pageScalePinchZoomEnabled = false;
} // namespace
namespace cc {
bool CCSettings::perTilePaintingEnabled() { return s_perTilePaintingEnabled; }
void CCSettings::setPerTilePaintingEnabled(bool enabled) { s_perTilePaintingEnabled = enabled; }
bool CCSettings::partialSwapEnabled() { return s_partialSwapEnabled; }
void CCSettings::setPartialSwapEnabled(bool enabled) { s_partialSwapEnabled = enabled; }
bool CCSettings::acceleratedAnimationEnabled() { return s_acceleratedAnimationEnabled; }
void CCSettings::setAcceleratedAnimationEnabled(bool enabled) { s_acceleratedAnimationEnabled = enabled; }
bool CCSettings::pageScalePinchZoomEnabled() { return s_pageScalePinchZoomEnabled; }
void CCSettings::setPageScalePinchZoomEnabled(bool enabled) { s_pageScalePinchZoomEnabled = enabled; }
bool CCSettings::jankInsteadOfCheckerboard()
{
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kJankInsteadOfCheckerboard);
}
bool CCSettings::backgroundColorInsteadOfCheckerboard()
{
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
}
void CCSettings::reset()
{
s_perTilePaintingEnabled = false;
s_partialSwapEnabled = false;
s_acceleratedAnimationEnabled = false;
s_pageScalePinchZoomEnabled = false;
}
} // namespace cc
|