| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void LayerImpl::appendDebugBorderQuad(QuadSink& quadList, const SharedQuadState*
sharedQuadState, AppendQuadsData& appendQuadsData) const | 172 void LayerImpl::appendDebugBorderQuad(QuadSink& quadList, const SharedQuadState*
sharedQuadState, AppendQuadsData& appendQuadsData) const |
| 173 { | 173 { |
| 174 if (!showDebugBorders()) | 174 if (!showDebugBorders()) |
| 175 return; | 175 return; |
| 176 | 176 |
| 177 SkColor color; | 177 SkColor color; |
| 178 float width; | 178 float width; |
| 179 getDebugBorderProperties(&color, &width); | 179 getDebugBorderProperties(&color, &width); |
| 180 | 180 |
| 181 gfx::Rect contentRect(gfx::Point(), contentBounds()); | 181 gfx::Rect contentRect(gfx::Point(), contentBounds()); |
| 182 quadList.append(DebugBorderDrawQuad::create(sharedQuadState, contentRect, co
lor, width).PassAs<DrawQuad>(), appendQuadsData); | 182 scoped_ptr<DebugBorderDrawQuad> debugBorderQuad = DebugBorderDrawQuad::Creat
e(); |
| 183 debugBorderQuad->SetNew(sharedQuadState, contentRect, color, width); |
| 184 quadList.append(debugBorderQuad.PassAs<DrawQuad>(), appendQuadsData); |
| 183 } | 185 } |
| 184 | 186 |
| 185 bool LayerImpl::hasContributingDelegatedRenderPasses() const | 187 bool LayerImpl::hasContributingDelegatedRenderPasses() const |
| 186 { | 188 { |
| 187 return false; | 189 return false; |
| 188 } | 190 } |
| 189 | 191 |
| 190 RenderPass::Id LayerImpl::firstContributingRenderPassId() const | 192 RenderPass::Id LayerImpl::firstContributingRenderPassId() const |
| 191 { | 193 { |
| 192 return RenderPass::Id(0, 0); | 194 return RenderPass::Id(0, 0); |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 711 |
| 710 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 712 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
| 711 { | 713 { |
| 712 if (!m_scrollbarAnimationController) | 714 if (!m_scrollbarAnimationController) |
| 713 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 715 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
| 714 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 716 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 715 m_scrollbarAnimationController->updateScrollOffset(this); | 717 m_scrollbarAnimationController->updateScrollOffset(this); |
| 716 } | 718 } |
| 717 | 719 |
| 718 } // namespace cc | 720 } // namespace cc |
| OLD | NEW |