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

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: Rebase to 170216 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
« no previous file with comments | « cc/heads_up_display_unittest.cc ('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
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #ifndef NDEBUG 142 #ifndef NDEBUG
143 DCHECK(m_betweenWillDrawAndDidDraw); 143 DCHECK(m_betweenWillDrawAndDidDraw);
144 m_betweenWillDrawAndDidDraw = false; 144 m_betweenWillDrawAndDidDraw = false;
145 #endif 145 #endif
146 } 146 }
147 147
148 bool LayerImpl::showDebugBorders() const 148 bool LayerImpl::showDebugBorders() const
149 { 149 {
150 if (!m_layerTreeHostImpl) 150 if (!m_layerTreeHostImpl)
151 return false; 151 return false;
152 return m_layerTreeHostImpl->settings().showDebugBorders; 152 return m_layerTreeHostImpl->debugState().showDebugBorders;
153 } 153 }
154 154
155 void LayerImpl::getDebugBorderProperties(SkColor* color, float* width) const 155 void LayerImpl::getDebugBorderProperties(SkColor* color, float* width) const
156 { 156 {
157 if (m_drawsContent) { 157 if (m_drawsContent) {
158 *color = DebugColors::ContentLayerBorderColor(); 158 *color = DebugColors::ContentLayerBorderColor();
159 *width = DebugColors::ContentLayerBorderWidth(m_layerTreeHostImpl); 159 *width = DebugColors::ContentLayerBorderWidth(m_layerTreeHostImpl);
160 return; 160 return;
161 } 161 }
162 162
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 722
723 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 723 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
724 { 724 {
725 if (!m_scrollbarAnimationController) 725 if (!m_scrollbarAnimationController)
726 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 726 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
727 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 727 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
728 m_scrollbarAnimationController->updateScrollOffset(this); 728 m_scrollbarAnimationController->updateScrollOffset(this);
729 } 729 }
730 730
731 } // namespace cc 731 } // namespace cc
OLDNEW
« no previous file with comments | « cc/heads_up_display_unittest.cc ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698