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

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

Issue 2698473006: Set layer scroll data from PaintArtifactCompositor (Closed)
Patch Set: More comments 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 layer->set_offset_to_transform_parent(layerOffset); 721 layer->set_offset_to_transform_parent(layerOffset);
722 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId()); 722 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId());
723 723
724 m_rootLayer->AddChild(layer); 724 m_rootLayer->AddChild(layer);
725 layer->set_property_tree_sequence_number( 725 layer->set_property_tree_sequence_number(
726 PropertyTreeManager::kPropertyTreeSequenceNumber); 726 PropertyTreeManager::kPropertyTreeSequenceNumber);
727 layer->SetTransformTreeIndex(transformId); 727 layer->SetTransformTreeIndex(transformId);
728 layer->SetClipTreeIndex(clipId); 728 layer->SetClipTreeIndex(clipId);
729 layer->SetEffectTreeIndex(effectId); 729 layer->SetEffectTreeIndex(effectId);
730 layer->SetScrollTreeIndex(propertyTreeManager.ensureCompositorScrollNode( 730 propertyTreeManager.updateLayerScrollMapping(layer.get(), transform);
731 transform->findEnclosingScrollNode()));
732 731
733 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); 732 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
734 733
735 if (m_extraDataForTestingEnabled) 734 if (m_extraDataForTestingEnabled)
736 m_extraDataForTesting->contentLayers.push_back(layer); 735 m_extraDataForTesting->contentLayers.push_back(layer);
737 } 736 }
738 m_contentLayerClients.clear(); 737 m_contentLayerClients.clear();
739 m_contentLayerClients.swap(newContentLayerClients); 738 m_contentLayerClients.swap(newContentLayerClients);
740 739
741 // Mark the property trees as having been rebuilt. 740 // Mark the property trees as having been rebuilt.
742 layerTreeHost->property_trees()->sequence_number = 741 layerTreeHost->property_trees()->sequence_number =
743 PropertyTreeManager::kPropertyTreeSequenceNumber; 742 PropertyTreeManager::kPropertyTreeSequenceNumber;
744 layerTreeHost->property_trees()->needs_rebuild = false; 743 layerTreeHost->property_trees()->needs_rebuild = false;
745 layerTreeHost->property_trees()->ResetCachedData(); 744 layerTreeHost->property_trees()->ResetCachedData();
746 } 745 }
747 746
748 #ifndef NDEBUG 747 #ifndef NDEBUG
749 void PaintArtifactCompositor::showDebugData() { 748 void PaintArtifactCompositor::showDebugData() {
750 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 749 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
751 ->toPrettyJSONString() 750 ->toPrettyJSONString()
752 .utf8() 751 .utf8()
753 .data(); 752 .data();
754 } 753 }
755 #endif 754 #endif
756 755
757 } // namespace blink 756 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698