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

Side by Side Diff: cc/layer_tree_debug_state.cc

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/layer_tree_debug_state.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/layer_tree_debug_state.h"
6
7 #include "base/logging.h"
8
9 namespace cc {
10
11 LayerTreeDebugState::LayerTreeDebugState()
12 : showFPSCounter(false)
13 , showPlatformLayerTree(false)
14 , showDebugBorders(false)
15 , showPaintRects(false)
16 , showPropertyChangedRects(false)
17 , showSurfaceDamageRects(false)
18 , showScreenSpaceRects(false)
19 , showReplicaScreenSpaceRects(false)
20 , showOccludingRects(false)
21 , showNonOccludingRects(false) { }
22
23 LayerTreeDebugState::~LayerTreeDebugState() {
24 }
25
26 bool LayerTreeDebugState::showHudInfo() const {
27 return showFPSCounter || showPlatformLayerTree || showHudRects();
28 }
29
30 bool LayerTreeDebugState::showHudRects() const {
31 return showPaintRects || showPropertyChangedRects || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceRects || showOccludingRects || showNonOccludingRects;
32 }
33
34 bool LayerTreeDebugState::hudNeedsFont() const {
35 return showFPSCounter || showPlatformLayerTree;
36 }
37
38 bool LayerTreeDebugState::equal(const LayerTreeDebugState& a, const LayerTreeDeb ugState& b) {
39 return memcmp(&a, &b, sizeof(LayerTreeDebugState)) == 0;
40 }
41
42 LayerTreeDebugState LayerTreeDebugState::unite(const LayerTreeDebugState& a, con st LayerTreeDebugState& b) {
43 LayerTreeDebugState r(a);
44
45 r.showFPSCounter |= b.showFPSCounter;
46 r.showPlatformLayerTree |= b.showPlatformLayerTree;
47 r.showDebugBorders |= b.showDebugBorders;
48
49 r.showPaintRects |= b.showPaintRects;
50 r.showPropertyChangedRects |= b.showPropertyChangedRects;
51 r.showSurfaceDamageRects |= b.showSurfaceDamageRects;
52 r.showScreenSpaceRects |= b.showScreenSpaceRects;
53 r.showReplicaScreenSpaceRects |= b.showReplicaScreenSpaceRects;
54 r.showOccludingRects |= b.showOccludingRects;
55 r.showNonOccludingRects |= b.showNonOccludingRects;
56
57 return r;
58 }
59
60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_debug_state.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698