OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/graphics/compositing/PaintArtifactCompositor.h" | 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" |
6 | 6 |
7 #include "cc/layers/content_layer_client.h" | 7 #include "cc/layers/content_layer_client.h" |
8 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
9 #include "cc/layers/picture_layer.h" | 9 #include "cc/layers/picture_layer.h" |
10 #include "cc/playback/display_item_list.h" | 10 #include "cc/playback/display_item_list.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return nodeA; | 435 return nodeA; |
436 } | 436 } |
437 | 437 |
438 int PropertyTreeManager::switchToEffectNode(const EffectPaintPropertyNode& nextE
ffect) | 438 int PropertyTreeManager::switchToEffectNode(const EffectPaintPropertyNode& nextE
ffect) |
439 { | 439 { |
440 const EffectPaintPropertyNode* ancestor = lowestCommonAncestor(currentEffect
Node(), &nextEffect); | 440 const EffectPaintPropertyNode* ancestor = lowestCommonAncestor(currentEffect
Node(), &nextEffect); |
441 while (currentEffectNode() != ancestor) | 441 while (currentEffectNode() != ancestor) |
442 m_effectStack.removeLast(); | 442 m_effectStack.removeLast(); |
443 | 443 |
444 #if DCHECK_IS_ON() | 444 #if DCHECK_IS_ON() |
445 DCHECK(m_isFirstEffectEver || currentEffectNode()) << "Malformed effect tree
. Nodes in the same property tree should have common root."; | 445 DCHECK(m_isFirstEffectEver || currentEffectNode()) << "Malformed effect tree
. Nodes in the same property tree should have common root. " << &nextEffect; |
446 m_isFirstEffectEver = false; | 446 m_isFirstEffectEver = false; |
447 #endif | 447 #endif |
448 buildEffectNodesRecursively(&nextEffect); | 448 buildEffectNodesRecursively(&nextEffect); |
449 | 449 |
450 return compositorIdForCurrentEffectNode(); | 450 return compositorIdForCurrentEffectNode(); |
451 } | 451 } |
452 | 452 |
453 void PropertyTreeManager::buildEffectNodesRecursively(const EffectPaintPropertyN
ode* nextEffect) | 453 void PropertyTreeManager::buildEffectNodesRecursively(const EffectPaintPropertyN
ode* nextEffect) |
454 { | 454 { |
455 if (nextEffect == currentEffectNode()) | 455 if (nextEffect == currentEffectNode()) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 if (m_extraDataForTestingEnabled) | 547 if (m_extraDataForTestingEnabled) |
548 m_extraDataForTesting->contentLayers.append(layer); | 548 m_extraDataForTesting->contentLayers.append(layer); |
549 } | 549 } |
550 | 550 |
551 // Mark the property trees as having been rebuilt. | 551 // Mark the property trees as having been rebuilt. |
552 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; | 552 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; |
553 layerTree->property_trees()->needs_rebuild = false; | 553 layerTree->property_trees()->needs_rebuild = false; |
554 } | 554 } |
555 | 555 |
556 } // namespace blink | 556 } // namespace blink |
OLD | NEW |