| 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 "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "cc/animation/animation_registrar.h" | 11 #include "cc/animation/animation_registrar.h" |
| 12 #include "cc/animation/scrollbar_animation_controller.h" | 12 #include "cc/animation/scrollbar_animation_controller.h" |
| 13 #include "cc/base/math_util.h" | 13 #include "cc/base/math_util.h" |
| 14 #include "cc/base/simple_enclosed_region.h" |
| 14 #include "cc/debug/debug_colors.h" | 15 #include "cc/debug/debug_colors.h" |
| 15 #include "cc/debug/layer_tree_debug_state.h" | 16 #include "cc/debug/layer_tree_debug_state.h" |
| 16 #include "cc/debug/micro_benchmark_impl.h" | 17 #include "cc/debug/micro_benchmark_impl.h" |
| 17 #include "cc/debug/traced_value.h" | 18 #include "cc/debug/traced_value.h" |
| 18 #include "cc/input/layer_scroll_offset_delegate.h" | 19 #include "cc/input/layer_scroll_offset_delegate.h" |
| 19 #include "cc/layers/layer_utils.h" | 20 #include "cc/layers/layer_utils.h" |
| 20 #include "cc/layers/painted_scrollbar_layer_impl.h" | 21 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 21 #include "cc/output/copy_output_request.h" | 22 #include "cc/output/copy_output_request.h" |
| 22 #include "cc/quads/debug_border_draw_quad.h" | 23 #include "cc/quads/debug_border_draw_quad.h" |
| 23 #include "cc/trees/layer_tree_host_common.h" | 24 #include "cc/trees/layer_tree_host_common.h" |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 } | 1141 } |
| 1141 | 1142 |
| 1142 void LayerImpl::SetDoubleSided(bool double_sided) { | 1143 void LayerImpl::SetDoubleSided(bool double_sided) { |
| 1143 if (double_sided_ == double_sided) | 1144 if (double_sided_ == double_sided) |
| 1144 return; | 1145 return; |
| 1145 | 1146 |
| 1146 double_sided_ = double_sided; | 1147 double_sided_ = double_sided; |
| 1147 NoteLayerPropertyChangedForSubtree(); | 1148 NoteLayerPropertyChangedForSubtree(); |
| 1148 } | 1149 } |
| 1149 | 1150 |
| 1150 Region LayerImpl::VisibleContentOpaqueRegion() const { | 1151 SimpleEnclosedRegion LayerImpl::VisibleContentOpaqueRegion() const { |
| 1151 if (contents_opaque()) | 1152 if (contents_opaque()) |
| 1152 return visible_content_rect(); | 1153 return SimpleEnclosedRegion(visible_content_rect()); |
| 1153 return Region(); | 1154 return SimpleEnclosedRegion(); |
| 1154 } | 1155 } |
| 1155 | 1156 |
| 1156 void LayerImpl::DidBeginTracing() {} | 1157 void LayerImpl::DidBeginTracing() {} |
| 1157 | 1158 |
| 1158 void LayerImpl::ReleaseResources() {} | 1159 void LayerImpl::ReleaseResources() {} |
| 1159 | 1160 |
| 1160 gfx::Vector2d LayerImpl::MaxScrollOffset() const { | 1161 gfx::Vector2d LayerImpl::MaxScrollOffset() const { |
| 1161 if (!scroll_clip_layer_ || bounds().IsEmpty()) | 1162 if (!scroll_clip_layer_ || bounds().IsEmpty()) |
| 1162 return gfx::Vector2d(); | 1163 return gfx::Vector2d(); |
| 1163 | 1164 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 } | 1536 } |
| 1536 | 1537 |
| 1537 void LayerImpl::NotifyAnimationFinished( | 1538 void LayerImpl::NotifyAnimationFinished( |
| 1538 base::TimeTicks monotonic_time, | 1539 base::TimeTicks monotonic_time, |
| 1539 Animation::TargetProperty target_property) { | 1540 Animation::TargetProperty target_property) { |
| 1540 if (target_property == Animation::ScrollOffset) | 1541 if (target_property == Animation::ScrollOffset) |
| 1541 layer_tree_impl_->InputScrollAnimationFinished(); | 1542 layer_tree_impl_->InputScrollAnimationFinished(); |
| 1542 } | 1543 } |
| 1543 | 1544 |
| 1544 } // namespace cc | 1545 } // namespace cc |
| OLD | NEW |