| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 layer->SetUpdateRect(inputs_.update_rect); | 1200 layer->SetUpdateRect(inputs_.update_rect); |
| 1201 | 1201 |
| 1202 layer->SetHasWillChangeTransformHint(has_will_change_transform_hint()); | 1202 layer->SetHasWillChangeTransformHint(has_will_change_transform_hint()); |
| 1203 layer->SetNeedsPushProperties(); | 1203 layer->SetNeedsPushProperties(); |
| 1204 | 1204 |
| 1205 // Reset any state that should be cleared for the next update. | 1205 // Reset any state that should be cleared for the next update. |
| 1206 needs_show_scrollbars_ = false; | 1206 needs_show_scrollbars_ = false; |
| 1207 subtree_property_changed_ = false; | 1207 subtree_property_changed_ = false; |
| 1208 inputs_.update_rect = gfx::Rect(); | 1208 inputs_.update_rect = gfx::Rect(); |
| 1209 | 1209 |
| 1210 if (mask_layer()) |
| 1211 DCHECK_EQ(bounds().ToString(), mask_layer()->bounds().ToString()); |
| 1210 layer_tree_host_->RemoveLayerShouldPushProperties(this); | 1212 layer_tree_host_->RemoveLayerShouldPushProperties(this); |
| 1211 } | 1213 } |
| 1212 | 1214 |
| 1213 void Layer::TakeCopyRequests( | 1215 void Layer::TakeCopyRequests( |
| 1214 std::vector<std::unique_ptr<CopyOutputRequest>>* requests) { | 1216 std::vector<std::unique_ptr<CopyOutputRequest>>* requests) { |
| 1215 for (auto& it : inputs_.copy_requests) { | 1217 for (auto& it : inputs_.copy_requests) { |
| 1216 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner = | 1218 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner = |
| 1217 layer_tree_host()->GetTaskRunnerProvider()->MainThreadTaskRunner(); | 1219 layer_tree_host()->GetTaskRunnerProvider()->MainThreadTaskRunner(); |
| 1218 std::unique_ptr<CopyOutputRequest> original_request = std::move(it); | 1220 std::unique_ptr<CopyOutputRequest> original_request = std::move(it); |
| 1219 const CopyOutputRequest& original_request_ref = *original_request; | 1221 const CopyOutputRequest& original_request_ref = *original_request; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 ->subtree_has_copy_request; | 1430 ->subtree_has_copy_request; |
| 1429 } | 1431 } |
| 1430 | 1432 |
| 1431 gfx::Transform Layer::ScreenSpaceTransform() const { | 1433 gfx::Transform Layer::ScreenSpaceTransform() const { |
| 1432 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1434 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1433 return draw_property_utils::ScreenSpaceTransform( | 1435 return draw_property_utils::ScreenSpaceTransform( |
| 1434 this, layer_tree_host_->property_trees()->transform_tree); | 1436 this, layer_tree_host_->property_trees()->transform_tree); |
| 1435 } | 1437 } |
| 1436 | 1438 |
| 1437 } // namespace cc | 1439 } // namespace cc |
| OLD | NEW |