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/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/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/scrollbar_animation_controller.h" | 10 #include "cc/animation/scrollbar_animation_controller.h" |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
939 double_sided_ = double_sided; | 939 double_sided_ = double_sided; |
940 NoteLayerPropertyChangedForSubtree(); | 940 NoteLayerPropertyChangedForSubtree(); |
941 } | 941 } |
942 | 942 |
943 Region LayerImpl::VisibleContentOpaqueRegion() const { | 943 Region LayerImpl::VisibleContentOpaqueRegion() const { |
944 if (contents_opaque()) | 944 if (contents_opaque()) |
945 return visible_content_rect(); | 945 return visible_content_rect(); |
946 return Region(); | 946 return Region(); |
947 } | 947 } |
948 | 948 |
949 void LayerImpl::DidBeginTracing() { | |
enne (OOO)
2013/05/31 23:27:21
No more roll-your-own-layer-recursion. Please use
| |
950 for (size_t i = 0; i < children_.size(); ++i) | |
951 children_[i]->DidBeginTracing(); | |
952 if (mask_layer_) | |
953 mask_layer_->DidBeginTracing(); | |
954 if (replica_layer_) | |
955 replica_layer_->DidBeginTracing(); | |
956 } | |
957 | |
949 void LayerImpl::DidLoseOutputSurface() {} | 958 void LayerImpl::DidLoseOutputSurface() {} |
950 | 959 |
951 void LayerImpl::SetMaxScrollOffset(gfx::Vector2d max_scroll_offset) { | 960 void LayerImpl::SetMaxScrollOffset(gfx::Vector2d max_scroll_offset) { |
952 if (max_scroll_offset_ == max_scroll_offset) | 961 if (max_scroll_offset_ == max_scroll_offset) |
953 return; | 962 return; |
954 max_scroll_offset_ = max_scroll_offset; | 963 max_scroll_offset_ = max_scroll_offset; |
955 | 964 |
956 layer_tree_impl()->set_needs_update_draw_properties(); | 965 layer_tree_impl()->set_needs_update_draw_properties(); |
957 UpdateScrollbarPositions(); | 966 UpdateScrollbarPositions(); |
958 } | 967 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1028 | 1037 |
1029 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } | 1038 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } |
1030 | 1039 |
1031 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1040 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1032 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1041 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1033 AsValueInto(state.get()); | 1042 AsValueInto(state.get()); |
1034 return state.PassAs<base::Value>(); | 1043 return state.PassAs<base::Value>(); |
1035 } | 1044 } |
1036 | 1045 |
1037 } // namespace cc | 1046 } // namespace cc |
OLD | NEW |