| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |