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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 PropertyTreeBuilder::PreCalculateMetaInformation(root_layer_.get()); | 973 PropertyTreeBuilder::PreCalculateMetaInformation(root_layer_.get()); |
974 gfx::Transform identity_transform; | 974 gfx::Transform identity_transform; |
975 PropertyTreeBuilder::BuildPropertyTrees( | 975 PropertyTreeBuilder::BuildPropertyTrees( |
976 root_layer_.get(), page_scale_layer_.get(), | 976 root_layer_.get(), page_scale_layer_.get(), |
977 inner_viewport_scroll_layer_.get(), outer_viewport_scroll_layer_.get(), | 977 inner_viewport_scroll_layer_.get(), outer_viewport_scroll_layer_.get(), |
978 overscroll_elasticity_layer_.get(), elastic_overscroll_, | 978 overscroll_elasticity_layer_.get(), elastic_overscroll_, |
979 page_scale_factor_, device_scale_factor_, | 979 page_scale_factor_, device_scale_factor_, |
980 gfx::Rect(device_viewport_size_), identity_transform, &property_trees_); | 980 gfx::Rect(device_viewport_size_), identity_transform, &property_trees_); |
981 } | 981 } |
982 | 982 |
| 983 static void SetElementIdForTesting(Layer* layer) { |
| 984 layer->SetElementId(LayerIdToElementIdForTesting(layer->id())); |
| 985 } |
| 986 |
| 987 void LayerTreeHost::SetElementIdsForTesting() { |
| 988 LayerTreeHostCommon::CallFunctionForEveryLayer(this, SetElementIdForTesting); |
| 989 } |
| 990 |
983 bool LayerTreeHost::UsingSharedMemoryResources() { | 991 bool LayerTreeHost::UsingSharedMemoryResources() { |
984 return GetRendererCapabilities().using_shared_memory_resources; | 992 return GetRendererCapabilities().using_shared_memory_resources; |
985 } | 993 } |
986 | 994 |
987 bool LayerTreeHost::DoUpdateLayers(Layer* root_layer) { | 995 bool LayerTreeHost::DoUpdateLayers(Layer* root_layer) { |
988 TRACE_EVENT1("cc", "LayerTreeHost::DoUpdateLayers", "source_frame_number", | 996 TRACE_EVENT1("cc", "LayerTreeHost::DoUpdateLayers", "source_frame_number", |
989 source_frame_number()); | 997 source_frame_number()); |
990 | 998 |
991 UpdateHudLayer(); | 999 UpdateHudLayer(); |
992 | 1000 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); | 1304 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); |
1297 } | 1305 } |
1298 | 1306 |
1299 void LayerTreeHost::SetLayerTreeMutator( | 1307 void LayerTreeHost::SetLayerTreeMutator( |
1300 std::unique_ptr<LayerTreeMutator> mutator) { | 1308 std::unique_ptr<LayerTreeMutator> mutator) { |
1301 proxy_->SetMutator(std::move(mutator)); | 1309 proxy_->SetMutator(std::move(mutator)); |
1302 } | 1310 } |
1303 | 1311 |
1304 Layer* LayerTreeHost::LayerById(int id) const { | 1312 Layer* LayerTreeHost::LayerById(int id) const { |
1305 LayerIdMap::const_iterator iter = layer_id_map_.find(id); | 1313 LayerIdMap::const_iterator iter = layer_id_map_.find(id); |
1306 return iter != layer_id_map_.end() ? iter->second : NULL; | 1314 return iter != layer_id_map_.end() ? iter->second : nullptr; |
| 1315 } |
| 1316 |
| 1317 Layer* LayerTreeHost::LayerByElementId(ElementId element_id) const { |
| 1318 ElementLayersMap::const_iterator iter = element_layers_map_.find(element_id); |
| 1319 return iter != element_layers_map_.end() ? iter->second : nullptr; |
| 1320 } |
| 1321 |
| 1322 void LayerTreeHost::AddToElementMap(Layer* layer) { |
| 1323 if (!layer->element_id()) |
| 1324 return; |
| 1325 |
| 1326 element_layers_map_[layer->element_id()] = layer; |
| 1327 } |
| 1328 |
| 1329 void LayerTreeHost::RemoveFromElementMap(Layer* layer) { |
| 1330 if (!layer->element_id()) |
| 1331 return; |
| 1332 |
| 1333 element_layers_map_.erase(layer->element_id()); |
1307 } | 1334 } |
1308 | 1335 |
1309 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { | 1336 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { |
1310 layers_that_should_push_properties_.insert(layer); | 1337 layers_that_should_push_properties_.insert(layer); |
1311 } | 1338 } |
1312 | 1339 |
1313 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { | 1340 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { |
1314 layers_that_should_push_properties_.erase(layer); | 1341 layers_that_should_push_properties_.erase(layer); |
1315 } | 1342 } |
1316 | 1343 |
1317 std::unordered_set<Layer*>& LayerTreeHost::LayersThatShouldPushProperties() { | 1344 std::unordered_set<Layer*>& LayerTreeHost::LayersThatShouldPushProperties() { |
1318 return layers_that_should_push_properties_; | 1345 return layers_that_should_push_properties_; |
1319 } | 1346 } |
1320 | 1347 |
1321 bool LayerTreeHost::LayerNeedsPushPropertiesForTesting(Layer* layer) { | 1348 bool LayerTreeHost::LayerNeedsPushPropertiesForTesting(Layer* layer) { |
1322 return layers_that_should_push_properties_.find(layer) != | 1349 return layers_that_should_push_properties_.find(layer) != |
1323 layers_that_should_push_properties_.end(); | 1350 layers_that_should_push_properties_.end(); |
1324 } | 1351 } |
1325 | 1352 |
1326 void LayerTreeHost::RegisterLayer(Layer* layer) { | 1353 void LayerTreeHost::RegisterLayer(Layer* layer) { |
1327 DCHECK(!LayerById(layer->id())); | 1354 DCHECK(!LayerById(layer->id())); |
1328 DCHECK(!in_paint_layer_contents_); | 1355 DCHECK(!in_paint_layer_contents_); |
1329 layer_id_map_[layer->id()] = layer; | 1356 layer_id_map_[layer->id()] = layer; |
1330 animation_host_->RegisterElement(layer->id(), ElementListType::ACTIVE); | 1357 if (layer->element_id()) { |
| 1358 animation_host_->RegisterElement(layer->element_id(), |
| 1359 ElementListType::ACTIVE); |
| 1360 } |
1331 } | 1361 } |
1332 | 1362 |
1333 void LayerTreeHost::UnregisterLayer(Layer* layer) { | 1363 void LayerTreeHost::UnregisterLayer(Layer* layer) { |
1334 DCHECK(LayerById(layer->id())); | 1364 DCHECK(LayerById(layer->id())); |
1335 DCHECK(!in_paint_layer_contents_); | 1365 DCHECK(!in_paint_layer_contents_); |
1336 animation_host_->UnregisterElement(layer->id(), ElementListType::ACTIVE); | 1366 if (layer->element_id()) { |
| 1367 animation_host_->UnregisterElement(layer->element_id(), |
| 1368 ElementListType::ACTIVE); |
| 1369 } |
1337 RemoveLayerShouldPushProperties(layer); | 1370 RemoveLayerShouldPushProperties(layer); |
1338 layer_id_map_.erase(layer->id()); | 1371 layer_id_map_.erase(layer->id()); |
1339 } | 1372 } |
1340 | 1373 |
1341 bool LayerTreeHost::IsElementInList(ElementId element_id, | 1374 bool LayerTreeHost::IsElementInList(ElementId element_id, |
1342 ElementListType list_type) const { | 1375 ElementListType list_type) const { |
1343 return list_type == ElementListType::ACTIVE && LayerById(element_id); | 1376 return list_type == ElementListType::ACTIVE && LayerByElementId(element_id); |
1344 } | 1377 } |
1345 | 1378 |
1346 void LayerTreeHost::SetMutatorsNeedCommit() { | 1379 void LayerTreeHost::SetMutatorsNeedCommit() { |
1347 SetNeedsCommit(); | 1380 SetNeedsCommit(); |
1348 } | 1381 } |
1349 | 1382 |
1350 void LayerTreeHost::SetMutatorsNeedRebuildPropertyTrees() { | 1383 void LayerTreeHost::SetMutatorsNeedRebuildPropertyTrees() { |
1351 property_trees_.needs_rebuild = true; | 1384 property_trees_.needs_rebuild = true; |
1352 } | 1385 } |
1353 | 1386 |
1354 void LayerTreeHost::SetElementFilterMutated(ElementId element_id, | 1387 void LayerTreeHost::SetElementFilterMutated(ElementId element_id, |
1355 ElementListType list_type, | 1388 ElementListType list_type, |
1356 const FilterOperations& filters) { | 1389 const FilterOperations& filters) { |
1357 Layer* layer = LayerById(element_id); | 1390 Layer* layer = LayerByElementId(element_id); |
1358 DCHECK(layer); | 1391 DCHECK(layer); |
1359 layer->OnFilterAnimated(filters); | 1392 layer->OnFilterAnimated(filters); |
1360 } | 1393 } |
1361 | 1394 |
1362 void LayerTreeHost::SetElementOpacityMutated(ElementId element_id, | 1395 void LayerTreeHost::SetElementOpacityMutated(ElementId element_id, |
1363 ElementListType list_type, | 1396 ElementListType list_type, |
1364 float opacity) { | 1397 float opacity) { |
1365 Layer* layer = LayerById(element_id); | 1398 Layer* layer = LayerByElementId(element_id); |
1366 DCHECK(layer); | 1399 DCHECK(layer); |
1367 layer->OnOpacityAnimated(opacity); | 1400 layer->OnOpacityAnimated(opacity); |
1368 } | 1401 } |
1369 | 1402 |
1370 void LayerTreeHost::SetElementTransformMutated( | 1403 void LayerTreeHost::SetElementTransformMutated( |
1371 ElementId element_id, | 1404 ElementId element_id, |
1372 ElementListType list_type, | 1405 ElementListType list_type, |
1373 const gfx::Transform& transform) { | 1406 const gfx::Transform& transform) { |
1374 Layer* layer = LayerById(element_id); | 1407 Layer* layer = LayerByElementId(element_id); |
1375 DCHECK(layer); | 1408 DCHECK(layer); |
1376 layer->OnTransformAnimated(transform); | 1409 layer->OnTransformAnimated(transform); |
1377 } | 1410 } |
1378 | 1411 |
1379 void LayerTreeHost::SetElementScrollOffsetMutated( | 1412 void LayerTreeHost::SetElementScrollOffsetMutated( |
1380 ElementId element_id, | 1413 ElementId element_id, |
1381 ElementListType list_type, | 1414 ElementListType list_type, |
1382 const gfx::ScrollOffset& scroll_offset) { | 1415 const gfx::ScrollOffset& scroll_offset) { |
1383 Layer* layer = LayerById(element_id); | 1416 Layer* layer = LayerByElementId(element_id); |
1384 DCHECK(layer); | 1417 DCHECK(layer); |
1385 layer->OnScrollOffsetAnimated(scroll_offset); | 1418 layer->OnScrollOffsetAnimated(scroll_offset); |
1386 } | 1419 } |
1387 | 1420 |
1388 void LayerTreeHost::ElementTransformIsAnimatingChanged( | 1421 void LayerTreeHost::ElementTransformIsAnimatingChanged( |
1389 ElementId element_id, | 1422 ElementId element_id, |
1390 ElementListType list_type, | 1423 ElementListType list_type, |
1391 AnimationChangeType change_type, | 1424 AnimationChangeType change_type, |
1392 bool is_animating) { | 1425 bool is_animating) { |
1393 Layer* layer = LayerById(element_id); | 1426 Layer* layer = LayerByElementId(element_id); |
1394 if (layer) { | 1427 if (layer) { |
1395 switch (change_type) { | 1428 switch (change_type) { |
1396 case AnimationChangeType::POTENTIAL: | 1429 case AnimationChangeType::POTENTIAL: |
1397 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); | 1430 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); |
1398 break; | 1431 break; |
1399 case AnimationChangeType::RUNNING: | 1432 case AnimationChangeType::RUNNING: |
1400 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating); | 1433 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating); |
1401 break; | 1434 break; |
1402 case AnimationChangeType::BOTH: | 1435 case AnimationChangeType::BOTH: |
1403 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); | 1436 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); |
1404 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating); | 1437 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating); |
1405 break; | 1438 break; |
1406 } | 1439 } |
1407 } | 1440 } |
1408 } | 1441 } |
1409 | 1442 |
1410 void LayerTreeHost::ElementOpacityIsAnimatingChanged( | 1443 void LayerTreeHost::ElementOpacityIsAnimatingChanged( |
1411 ElementId element_id, | 1444 ElementId element_id, |
1412 ElementListType list_type, | 1445 ElementListType list_type, |
1413 AnimationChangeType change_type, | 1446 AnimationChangeType change_type, |
1414 bool is_animating) { | 1447 bool is_animating) { |
1415 Layer* layer = LayerById(element_id); | 1448 Layer* layer = LayerByElementId(element_id); |
1416 if (layer) { | 1449 if (layer) { |
1417 switch (change_type) { | 1450 switch (change_type) { |
1418 case AnimationChangeType::POTENTIAL: | 1451 case AnimationChangeType::POTENTIAL: |
1419 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating); | 1452 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating); |
1420 break; | 1453 break; |
1421 case AnimationChangeType::RUNNING: | 1454 case AnimationChangeType::RUNNING: |
1422 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); | 1455 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); |
1423 break; | 1456 break; |
1424 case AnimationChangeType::BOTH: | 1457 case AnimationChangeType::BOTH: |
1425 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating); | 1458 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating); |
1426 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); | 1459 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); |
1427 break; | 1460 break; |
1428 } | 1461 } |
1429 } | 1462 } |
1430 } | 1463 } |
1431 | 1464 |
1432 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( | 1465 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( |
1433 ElementId element_id) const { | 1466 ElementId element_id) const { |
1434 Layer* layer = LayerById(element_id); | 1467 Layer* layer = LayerByElementId(element_id); |
1435 DCHECK(layer); | 1468 DCHECK(layer); |
1436 return layer->ScrollOffsetForAnimation(); | 1469 return layer->ScrollOffsetForAnimation(); |
1437 } | 1470 } |
1438 | 1471 |
1439 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( | 1472 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( |
1440 const Layer* layer) const { | 1473 const Layer* layer) const { |
1441 return animation_host_->ScrollOffsetAnimationWasInterrupted(layer->id()); | 1474 return animation_host_->ScrollOffsetAnimationWasInterrupted( |
| 1475 layer->element_id()); |
1442 } | 1476 } |
1443 | 1477 |
1444 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { | 1478 bool LayerTreeHost::IsAnimatingFilterProperty(const Layer* layer) const { |
1445 return animation_host_->IsAnimatingFilterProperty(layer->id(), | 1479 return animation_host_->IsAnimatingFilterProperty(layer->element_id(), |
1446 ElementListType::ACTIVE); | 1480 ElementListType::ACTIVE); |
1447 } | 1481 } |
1448 | 1482 |
1449 bool LayerTreeHost::IsAnimatingOpacityProperty(const Layer* layer) const { | 1483 bool LayerTreeHost::IsAnimatingOpacityProperty(const Layer* layer) const { |
1450 return animation_host_->IsAnimatingOpacityProperty(layer->id(), | 1484 return animation_host_->IsAnimatingOpacityProperty(layer->element_id(), |
1451 ElementListType::ACTIVE); | 1485 ElementListType::ACTIVE); |
1452 } | 1486 } |
1453 | 1487 |
1454 bool LayerTreeHost::IsAnimatingTransformProperty(const Layer* layer) const { | 1488 bool LayerTreeHost::IsAnimatingTransformProperty(const Layer* layer) const { |
1455 return animation_host_->IsAnimatingTransformProperty(layer->id(), | 1489 return animation_host_->IsAnimatingTransformProperty(layer->element_id(), |
1456 ElementListType::ACTIVE); | 1490 ElementListType::ACTIVE); |
1457 } | 1491 } |
1458 | 1492 |
1459 bool LayerTreeHost::HasPotentiallyRunningFilterAnimation( | 1493 bool LayerTreeHost::HasPotentiallyRunningFilterAnimation( |
1460 const Layer* layer) const { | 1494 const Layer* layer) const { |
1461 return animation_host_->HasPotentiallyRunningFilterAnimation( | 1495 return animation_host_->HasPotentiallyRunningFilterAnimation( |
1462 layer->id(), ElementListType::ACTIVE); | 1496 layer->element_id(), ElementListType::ACTIVE); |
1463 } | 1497 } |
1464 | 1498 |
1465 bool LayerTreeHost::HasPotentiallyRunningOpacityAnimation( | 1499 bool LayerTreeHost::HasPotentiallyRunningOpacityAnimation( |
1466 const Layer* layer) const { | 1500 const Layer* layer) const { |
1467 return animation_host_->HasPotentiallyRunningOpacityAnimation( | 1501 return animation_host_->HasPotentiallyRunningOpacityAnimation( |
1468 layer->id(), ElementListType::ACTIVE); | 1502 layer->element_id(), ElementListType::ACTIVE); |
1469 } | 1503 } |
1470 | 1504 |
1471 bool LayerTreeHost::HasPotentiallyRunningTransformAnimation( | 1505 bool LayerTreeHost::HasPotentiallyRunningTransformAnimation( |
1472 const Layer* layer) const { | 1506 const Layer* layer) const { |
1473 return animation_host_->HasPotentiallyRunningTransformAnimation( | 1507 return animation_host_->HasPotentiallyRunningTransformAnimation( |
1474 layer->id(), ElementListType::ACTIVE); | 1508 layer->element_id(), ElementListType::ACTIVE); |
1475 } | 1509 } |
1476 | 1510 |
1477 bool LayerTreeHost::HasOnlyTranslationTransforms(const Layer* layer) const { | 1511 bool LayerTreeHost::HasOnlyTranslationTransforms(const Layer* layer) const { |
1478 return animation_host_->HasOnlyTranslationTransforms(layer->id(), | 1512 return animation_host_->HasOnlyTranslationTransforms(layer->element_id(), |
1479 ElementListType::ACTIVE); | 1513 ElementListType::ACTIVE); |
1480 } | 1514 } |
1481 | 1515 |
1482 bool LayerTreeHost::MaximumTargetScale(const Layer* layer, | 1516 bool LayerTreeHost::MaximumTargetScale(const Layer* layer, |
1483 float* max_scale) const { | 1517 float* max_scale) const { |
1484 return animation_host_->MaximumTargetScale( | 1518 return animation_host_->MaximumTargetScale( |
1485 layer->id(), ElementListType::ACTIVE, max_scale); | 1519 layer->element_id(), ElementListType::ACTIVE, max_scale); |
1486 } | 1520 } |
1487 | 1521 |
1488 bool LayerTreeHost::AnimationStartScale(const Layer* layer, | 1522 bool LayerTreeHost::AnimationStartScale(const Layer* layer, |
1489 float* start_scale) const { | 1523 float* start_scale) const { |
1490 return animation_host_->AnimationStartScale( | 1524 return animation_host_->AnimationStartScale( |
1491 layer->id(), ElementListType::ACTIVE, start_scale); | 1525 layer->element_id(), ElementListType::ACTIVE, start_scale); |
1492 } | 1526 } |
1493 | 1527 |
1494 bool LayerTreeHost::HasAnyAnimationTargetingProperty( | 1528 bool LayerTreeHost::HasAnyAnimationTargetingProperty( |
1495 const Layer* layer, | 1529 const Layer* layer, |
1496 TargetProperty::Type property) const { | 1530 TargetProperty::Type property) const { |
1497 return animation_host_->HasAnyAnimationTargetingProperty(layer->id(), | 1531 return animation_host_->HasAnyAnimationTargetingProperty(layer->element_id(), |
1498 property); | 1532 property); |
1499 } | 1533 } |
1500 | 1534 |
1501 bool LayerTreeHost::AnimationsPreserveAxisAlignment(const Layer* layer) const { | 1535 bool LayerTreeHost::AnimationsPreserveAxisAlignment(const Layer* layer) const { |
1502 return animation_host_->AnimationsPreserveAxisAlignment(layer->id()); | 1536 return animation_host_->AnimationsPreserveAxisAlignment(layer->element_id()); |
1503 } | 1537 } |
1504 | 1538 |
1505 bool LayerTreeHost::HasAnyAnimation(const Layer* layer) const { | 1539 bool LayerTreeHost::HasAnyAnimation(const Layer* layer) const { |
1506 return animation_host_->HasAnyAnimation(layer->id()); | 1540 return animation_host_->HasAnyAnimation(layer->element_id()); |
1507 } | 1541 } |
1508 | 1542 |
1509 bool LayerTreeHost::HasActiveAnimationForTesting(const Layer* layer) const { | 1543 bool LayerTreeHost::HasActiveAnimationForTesting(const Layer* layer) const { |
1510 return animation_host_->HasActiveAnimationForTesting(layer->id()); | 1544 return animation_host_->HasActiveAnimationForTesting(layer->element_id()); |
1511 } | 1545 } |
1512 | 1546 |
1513 bool LayerTreeHost::IsSingleThreaded() const { | 1547 bool LayerTreeHost::IsSingleThreaded() const { |
1514 DCHECK(compositor_mode_ != CompositorMode::SINGLE_THREADED || | 1548 DCHECK(compositor_mode_ != CompositorMode::SINGLE_THREADED || |
1515 !task_runner_provider_->HasImplThread()); | 1549 !task_runner_provider_->HasImplThread()); |
1516 return compositor_mode_ == CompositorMode::SINGLE_THREADED; | 1550 return compositor_mode_ == CompositorMode::SINGLE_THREADED; |
1517 } | 1551 } |
1518 | 1552 |
1519 bool LayerTreeHost::IsThreaded() const { | 1553 bool LayerTreeHost::IsThreaded() const { |
1520 DCHECK(compositor_mode_ != CompositorMode::THREADED || | 1554 DCHECK(compositor_mode_ != CompositorMode::THREADED || |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 int seq_num = property_trees_.sequence_number; | 1762 int seq_num = property_trees_.sequence_number; |
1729 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1763 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
1730 layer->set_property_tree_sequence_number(seq_num); | 1764 layer->set_property_tree_sequence_number(seq_num); |
1731 }); | 1765 }); |
1732 | 1766 |
1733 surface_id_namespace_ = proto.surface_id_namespace(); | 1767 surface_id_namespace_ = proto.surface_id_namespace(); |
1734 next_surface_sequence_ = proto.next_surface_sequence(); | 1768 next_surface_sequence_ = proto.next_surface_sequence(); |
1735 } | 1769 } |
1736 | 1770 |
1737 } // namespace cc | 1771 } // namespace cc |
OLD | NEW |