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

Side by Side Diff: cc/layer_impl.cc

Issue 11414017: cc: handling debug settings in new LayerTreeDebugState structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rewrote to LayerTreeSwitches Created 8 years, 1 month 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 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 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 "cc/layer_impl.h" 5 #include "cc/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/debug_colors.h" 10 #include "cc/debug_colors.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 #ifndef NDEBUG 143 #ifndef NDEBUG
144 DCHECK(m_betweenWillDrawAndDidDraw); 144 DCHECK(m_betweenWillDrawAndDidDraw);
145 m_betweenWillDrawAndDidDraw = false; 145 m_betweenWillDrawAndDidDraw = false;
146 #endif 146 #endif
147 } 147 }
148 148
149 bool LayerImpl::showDebugBorders() const 149 bool LayerImpl::showDebugBorders() const
150 { 150 {
151 if (!m_layerTreeHostImpl) 151 if (!m_layerTreeHostImpl)
152 return false; 152 return false;
153 return m_layerTreeHostImpl->settings().showDebugBorders; 153 return m_layerTreeHostImpl->switches().showDebugBorders;
154 } 154 }
155 155
156 void LayerImpl::getDebugBorderProperties(SkColor* color, float* width) const 156 void LayerImpl::getDebugBorderProperties(SkColor* color, float* width) const
157 { 157 {
158 if (m_drawsContent) { 158 if (m_drawsContent) {
159 *color = DebugColors::ContentLayerBorderColor(); 159 *color = DebugColors::ContentLayerBorderColor();
160 *width = DebugColors::ContentLayerBorderWidth(m_layerTreeHostImpl); 160 *width = DebugColors::ContentLayerBorderWidth(m_layerTreeHostImpl);
161 return; 161 return;
162 } 162 }
163 163
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 723
724 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 724 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
725 { 725 {
726 if (!m_scrollbarAnimationController) 726 if (!m_scrollbarAnimationController)
727 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 727 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
728 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 728 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
729 m_scrollbarAnimationController->updateScrollOffset(this); 729 m_scrollbarAnimationController->updateScrollOffset(this);
730 } 730 }
731 731
732 } // namespace cc 732 } // namespace cc
OLDNEW
« no previous file with comments | « cc/heads_up_display_layer_impl.cc ('k') | cc/layer_tree_host.h » ('j') | cc/layer_tree_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698