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

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

Issue 2615773003: Replace LayerImpl::sorting_context_id with transform reference. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 1167
1168 layer->set_offset_to_transform_parent(layerOffset); 1168 layer->set_offset_to_transform_parent(layerOffset);
1169 1169
1170 m_rootLayer->AddChild(layer); 1170 m_rootLayer->AddChild(layer);
1171 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); 1171 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber);
1172 layer->SetTransformTreeIndex(transformId); 1172 layer->SetTransformTreeIndex(transformId);
1173 layer->SetClipTreeIndex(clipId); 1173 layer->SetClipTreeIndex(clipId);
1174 layer->SetEffectTreeIndex(effectId); 1174 layer->SetEffectTreeIndex(effectId);
1175 layer->SetScrollTreeIndex(scrollId); 1175 layer->SetScrollTreeIndex(scrollId);
1176 1176
1177 // TODO(jbroman): This probably shouldn't be necessary, but it is still
1178 // queried by RenderSurfaceImpl.
ajuma 2017/01/05 00:22:20 In theory, I think looking up the sorting context
chrishtr 2017/01/05 01:04:03 Correct, this is how it should work. Ali, should t
ajuma 2017/01/05 14:13:21 Yes, changing all the places in cc that use LayerI
1179 layer->Set3dSortingContextId(layerTree->property_trees() 1177 layer->Set3dSortingContextId(layerTree->property_trees()
1180 ->transform_tree.Node(transformId) 1178 ->transform_tree.Node(transformId)
1181 ->sorting_context_id); 1179 ->sorting_context_id);
1182 1180
1183 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); 1181 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
1184 1182
1185 if (m_extraDataForTestingEnabled) 1183 if (m_extraDataForTestingEnabled)
1186 m_extraDataForTesting->contentLayers.append(layer); 1184 m_extraDataForTesting->contentLayers.append(layer);
1187 } 1185 }
1188 m_contentLayerClients.clear(); 1186 m_contentLayerClients.clear();
1189 m_contentLayerClients.swap(newContentLayerClients); 1187 m_contentLayerClients.swap(newContentLayerClients);
1190 1188
1191 // Mark the property trees as having been rebuilt. 1189 // Mark the property trees as having been rebuilt.
1192 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 1190 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
1193 layerTree->property_trees()->needs_rebuild = false; 1191 layerTree->property_trees()->needs_rebuild = false;
1194 layerTree->property_trees()->ResetCachedData(); 1192 layerTree->property_trees()->ResetCachedData();
1195 } 1193 }
1196 1194
1197 #ifndef NDEBUG 1195 #ifndef NDEBUG
1198 void PaintArtifactCompositor::showDebugData() { 1196 void PaintArtifactCompositor::showDebugData() {
1199 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 1197 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
1200 ->toPrettyJSONString() 1198 ->toPrettyJSONString()
1201 .utf8() 1199 .utf8()
1202 .data(); 1200 .data();
1203 } 1201 }
1204 #endif 1202 #endif
1205 1203
1206 } // namespace blink 1204 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698