| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> |
| 8 |
| 7 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 8 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
| 9 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 10 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 11 #include "cc/animation/animation_registrar.h" | 13 #include "cc/animation/animation_registrar.h" |
| 12 #include "cc/animation/scrollbar_animation_controller.h" | 14 #include "cc/animation/scrollbar_animation_controller.h" |
| 13 #include "cc/base/math_util.h" | 15 #include "cc/base/math_util.h" |
| 14 #include "cc/base/simple_enclosed_region.h" | 16 #include "cc/base/simple_enclosed_region.h" |
| 15 #include "cc/debug/debug_colors.h" | 17 #include "cc/debug/debug_colors.h" |
| 16 #include "cc/debug/layer_tree_debug_state.h" | 18 #include "cc/debug/layer_tree_debug_state.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // Having both a scroll parent and a scroll offset delegate is unsupported. | 161 // Having both a scroll parent and a scroll offset delegate is unsupported. |
| 160 DCHECK(!scroll_offset_delegate_); | 162 DCHECK(!scroll_offset_delegate_); |
| 161 | 163 |
| 162 if (parent) | 164 if (parent) |
| 163 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent); | 165 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent); |
| 164 | 166 |
| 165 scroll_parent_ = parent; | 167 scroll_parent_ = parent; |
| 166 SetNeedsPushProperties(); | 168 SetNeedsPushProperties(); |
| 167 } | 169 } |
| 168 | 170 |
| 169 void LayerImpl::SetDebugInfo( | 171 void LayerImpl::SetDebugInfo(scoped_refptr<LayerDebugInfo> other) { |
| 170 scoped_refptr<base::debug::ConvertableToTraceFormat> other) { | |
| 171 debug_info_ = other; | 172 debug_info_ = other; |
| 172 SetNeedsPushProperties(); | 173 SetNeedsPushProperties(); |
| 173 } | 174 } |
| 174 | 175 |
| 175 void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) { | 176 void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) { |
| 176 if (scroll_children_.get() == children) | 177 if (scroll_children_.get() == children) |
| 177 return; | 178 return; |
| 178 scroll_children_.reset(children); | 179 scroll_children_.reset(children); |
| 179 SetNeedsPushProperties(); | 180 SetNeedsPushProperties(); |
| 180 } | 181 } |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 return num_descendants_that_draw_content_; | 1549 return num_descendants_that_draw_content_; |
| 1549 } | 1550 } |
| 1550 | 1551 |
| 1551 void LayerImpl::NotifyAnimationFinished( | 1552 void LayerImpl::NotifyAnimationFinished( |
| 1552 base::TimeTicks monotonic_time, | 1553 base::TimeTicks monotonic_time, |
| 1553 Animation::TargetProperty target_property) { | 1554 Animation::TargetProperty target_property) { |
| 1554 if (target_property == Animation::ScrollOffset) | 1555 if (target_property == Animation::ScrollOffset) |
| 1555 layer_tree_impl_->InputScrollAnimationFinished(); | 1556 layer_tree_impl_->InputScrollAnimationFinished(); |
| 1556 } | 1557 } |
| 1557 | 1558 |
| 1559 bool LayerImpl::GetDetailedPaintRects(std::vector<DebugRect>*) { |
| 1560 return false; |
| 1561 } |
| 1562 |
| 1558 } // namespace cc | 1563 } // namespace cc |
| OLD | NEW |