| 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 Vector<std::unique_ptr<ContentLayerClientImpl>> newContentLayerClients; | 779 Vector<std::unique_ptr<ContentLayerClientImpl>> newContentLayerClients; |
| 780 newContentLayerClients.reserveCapacity(paintArtifact.paintChunks().size()); | 780 newContentLayerClients.reserveCapacity(paintArtifact.paintChunks().size()); |
| 781 for (const PaintChunk& paintChunk : paintArtifact.paintChunks()) { | 781 for (const PaintChunk& paintChunk : paintArtifact.paintChunks()) { |
| 782 gfx::Vector2dF layerOffset; | 782 gfx::Vector2dF layerOffset; |
| 783 scoped_refptr<cc::Layer> layer = layerForPaintChunk( | 783 scoped_refptr<cc::Layer> layer = layerForPaintChunk( |
| 784 paintArtifact, paintChunk, layerOffset, newContentLayerClients, | 784 paintArtifact, paintChunk, layerOffset, newContentLayerClients, |
| 785 rasterChunkInvalidations ? rasterChunkInvalidations->find(&paintChunk) | 785 rasterChunkInvalidations ? rasterChunkInvalidations->find(&paintChunk) |
| 786 : nullptr); | 786 : nullptr); |
| 787 | 787 |
| 788 int transformId = propertyTreeManager.compositorIdForTransformNode( | 788 int transformId = propertyTreeManager.compositorIdForTransformNode( |
| 789 paintChunk.properties.transform.get()); | 789 paintChunk.properties.propertyTreeState.transform()); |
| 790 int scrollId = propertyTreeManager.compositorIdForScrollNode( | 790 int scrollId = propertyTreeManager.compositorIdForScrollNode( |
| 791 paintChunk.properties.scroll.get()); | 791 paintChunk.properties.propertyTreeState.scroll()); |
| 792 int clipId = propertyTreeManager.compositorIdForClipNode( | 792 int clipId = propertyTreeManager.compositorIdForClipNode( |
| 793 paintChunk.properties.clip.get()); | 793 paintChunk.properties.propertyTreeState.clip()); |
| 794 int effectId = propertyTreeManager.switchToEffectNode( | 794 int effectId = propertyTreeManager.switchToEffectNode( |
| 795 *paintChunk.properties.effect.get()); | 795 *paintChunk.properties.propertyTreeState.effect()); |
| 796 | 796 |
| 797 propertyTreeManager.updateScrollOffset(layer->id(), scrollId); | 797 propertyTreeManager.updateScrollOffset(layer->id(), scrollId); |
| 798 | 798 |
| 799 layer->set_offset_to_transform_parent(layerOffset); | 799 layer->set_offset_to_transform_parent(layerOffset); |
| 800 | 800 |
| 801 m_rootLayer->AddChild(layer); | 801 m_rootLayer->AddChild(layer); |
| 802 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); | 802 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); |
| 803 layer->SetTransformTreeIndex(transformId); | 803 layer->SetTransformTreeIndex(transformId); |
| 804 layer->SetClipTreeIndex(clipId); | 804 layer->SetClipTreeIndex(clipId); |
| 805 layer->SetEffectTreeIndex(effectId); | 805 layer->SetEffectTreeIndex(effectId); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 820 m_contentLayerClients.clear(); | 820 m_contentLayerClients.clear(); |
| 821 m_contentLayerClients.swap(newContentLayerClients); | 821 m_contentLayerClients.swap(newContentLayerClients); |
| 822 | 822 |
| 823 // Mark the property trees as having been rebuilt. | 823 // Mark the property trees as having been rebuilt. |
| 824 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; | 824 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; |
| 825 layerTree->property_trees()->needs_rebuild = false; | 825 layerTree->property_trees()->needs_rebuild = false; |
| 826 layerTree->property_trees()->ResetCachedData(); | 826 layerTree->property_trees()->ResetCachedData(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 } // namespace blink | 829 } // namespace blink |
| OLD | NEW |