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/strings/stringprintf.h" | 8 #include "base/strings/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 return; | 101 return; |
102 | 102 |
103 children_.clear(); | 103 children_.clear(); |
104 layer_tree_impl()->set_needs_update_draw_properties(); | 104 layer_tree_impl()->set_needs_update_draw_properties(); |
105 } | 105 } |
106 | 106 |
107 void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { | 107 void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { |
108 if (requests->empty()) | 108 if (requests->empty()) |
109 return; | 109 return; |
110 | 110 |
111 DCHECK(copy_requests_.empty()); | |
112 | |
113 copy_requests_.insert_and_take(copy_requests_.end(), *requests); | 111 copy_requests_.insert_and_take(copy_requests_.end(), *requests); |
114 requests->clear(); | 112 requests->clear(); |
115 | 113 |
116 if (layer_tree_impl()->IsActiveTree()) | 114 if (layer_tree_impl()->IsActiveTree()) |
117 layer_tree_impl()->AddLayerWithCopyOutputRequest(this); | 115 layer_tree_impl()->AddLayerWithCopyOutputRequest(this); |
118 NoteLayerPropertyChangedForSubtree(); | 116 NoteLayerPropertyChangedForSubtree(); |
119 } | 117 } |
120 | 118 |
121 void LayerImpl::TakeCopyRequestsAndTransformToTarget( | 119 void LayerImpl::TakeCopyRequestsAndTransformToTarget( |
122 ScopedPtrVector<CopyOutputRequest>* requests) { | 120 ScopedPtrVector<CopyOutputRequest>* requests) { |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 | 1119 |
1122 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } | 1120 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } |
1123 | 1121 |
1124 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1122 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1125 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1123 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1126 AsValueInto(state.get()); | 1124 AsValueInto(state.get()); |
1127 return state.PassAs<base::Value>(); | 1125 return state.PassAs<base::Value>(); |
1128 } | 1126 } |
1129 | 1127 |
1130 } // namespace cc | 1128 } // namespace cc |
OLD | NEW |