Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2667373002: Ensure PaintArtifactCompositor assigns a scroll tree index to all cc layers (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/compositing_display_item.h" 10 #include "cc/playback/compositing_display_item.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 716
717 layer->set_offset_to_transform_parent(layerOffset); 717 layer->set_offset_to_transform_parent(layerOffset);
718 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId()); 718 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId());
719 719
720 m_rootLayer->AddChild(layer); 720 m_rootLayer->AddChild(layer);
721 layer->set_property_tree_sequence_number( 721 layer->set_property_tree_sequence_number(
722 PropertyTreeManager::kPropertyTreeSequenceNumber); 722 PropertyTreeManager::kPropertyTreeSequenceNumber);
723 layer->SetTransformTreeIndex(transformId); 723 layer->SetTransformTreeIndex(transformId);
724 layer->SetClipTreeIndex(clipId); 724 layer->SetClipTreeIndex(clipId);
725 layer->SetEffectTreeIndex(effectId); 725 layer->SetEffectTreeIndex(effectId);
726 if (const auto* scrollNode = transform->scrollNode()) { 726 layer->SetScrollTreeIndex(propertyTreeManager.ensureCompositorScrollNode(
727 layer->SetScrollTreeIndex( 727 transform->findEnclosingScrollNode()));
728 propertyTreeManager.ensureCompositorScrollNode(scrollNode));
729 }
730 728
731 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); 729 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
732 730
733 if (m_extraDataForTestingEnabled) 731 if (m_extraDataForTestingEnabled)
734 m_extraDataForTesting->contentLayers.push_back(layer); 732 m_extraDataForTesting->contentLayers.push_back(layer);
735 } 733 }
736 m_contentLayerClients.clear(); 734 m_contentLayerClients.clear();
737 m_contentLayerClients.swap(newContentLayerClients); 735 m_contentLayerClients.swap(newContentLayerClients);
738 736
739 // Mark the property trees as having been rebuilt. 737 // Mark the property trees as having been rebuilt.
740 layerTreeHost->property_trees()->sequence_number = 738 layerTreeHost->property_trees()->sequence_number =
741 PropertyTreeManager::kPropertyTreeSequenceNumber; 739 PropertyTreeManager::kPropertyTreeSequenceNumber;
742 layerTreeHost->property_trees()->needs_rebuild = false; 740 layerTreeHost->property_trees()->needs_rebuild = false;
743 layerTreeHost->property_trees()->ResetCachedData(); 741 layerTreeHost->property_trees()->ResetCachedData();
744 } 742 }
745 743
746 #ifndef NDEBUG 744 #ifndef NDEBUG
747 void PaintArtifactCompositor::showDebugData() { 745 void PaintArtifactCompositor::showDebugData() {
748 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 746 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
749 ->toPrettyJSONString() 747 ->toPrettyJSONString()
750 .utf8() 748 .utf8()
751 .data(); 749 .data();
752 } 750 }
753 #endif 751 #endif
754 752
755 } // namespace blink 753 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698