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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 SetNeedsCommit(); | 1256 SetNeedsCommit(); |
1257 } | 1257 } |
1258 | 1258 |
1259 void LayerTreeHost::SetMutatorsNeedRebuildPropertyTrees() { | 1259 void LayerTreeHost::SetMutatorsNeedRebuildPropertyTrees() { |
1260 property_trees_.needs_rebuild = true; | 1260 property_trees_.needs_rebuild = true; |
1261 } | 1261 } |
1262 | 1262 |
1263 void LayerTreeHost::SetElementFilterMutated(ElementId element_id, | 1263 void LayerTreeHost::SetElementFilterMutated(ElementId element_id, |
1264 ElementListType list_type, | 1264 ElementListType list_type, |
1265 const FilterOperations& filters) { | 1265 const FilterOperations& filters) { |
| 1266 if (settings_.use_layer_lists) { |
| 1267 // In SPv2 we always have property trees and can set the filter |
| 1268 // directly on the effect node. |
| 1269 property_trees_.effect_tree.OnFilterAnimated(element_id, filters); |
| 1270 return; |
| 1271 } |
| 1272 |
1266 Layer* layer = LayerByElementId(element_id); | 1273 Layer* layer = LayerByElementId(element_id); |
1267 DCHECK(layer); | 1274 DCHECK(layer); |
1268 layer->OnFilterAnimated(filters); | 1275 layer->OnFilterAnimated(filters); |
1269 } | 1276 } |
1270 | 1277 |
1271 void LayerTreeHost::SetElementOpacityMutated(ElementId element_id, | 1278 void LayerTreeHost::SetElementOpacityMutated(ElementId element_id, |
1272 ElementListType list_type, | 1279 ElementListType list_type, |
1273 float opacity) { | 1280 float opacity) { |
1274 Layer* layer = LayerByElementId(element_id); | 1281 Layer* layer = LayerByElementId(element_id); |
1275 DCHECK(layer); | 1282 DCHECK(layer); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { | 1445 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { |
1439 for (auto* layer : *this) | 1446 for (auto* layer : *this) |
1440 layer->SetNeedsDisplay(); | 1447 layer->SetNeedsDisplay(); |
1441 } | 1448 } |
1442 | 1449 |
1443 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { | 1450 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { |
1444 has_copy_request_ = has_copy_request; | 1451 has_copy_request_ = has_copy_request; |
1445 } | 1452 } |
1446 | 1453 |
1447 } // namespace cc | 1454 } // namespace cc |
OLD | NEW |