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/compositing_display_item.h" | 10 #include "cc/playback/compositing_display_item.h" |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 | 1204 |
1205 layer->set_offset_to_transform_parent(layerOffset); | 1205 layer->set_offset_to_transform_parent(layerOffset); |
1206 | 1206 |
1207 m_rootLayer->AddChild(layer); | 1207 m_rootLayer->AddChild(layer); |
1208 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); | 1208 layer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); |
1209 layer->SetTransformTreeIndex(transformId); | 1209 layer->SetTransformTreeIndex(transformId); |
1210 layer->SetClipTreeIndex(clipId); | 1210 layer->SetClipTreeIndex(clipId); |
1211 layer->SetEffectTreeIndex(effectId); | 1211 layer->SetEffectTreeIndex(effectId); |
1212 layer->SetScrollTreeIndex(scrollId); | 1212 layer->SetScrollTreeIndex(scrollId); |
1213 | 1213 |
1214 // TODO(jbroman): This probably shouldn't be necessary, but it is still | |
1215 // queried by RenderSurfaceImpl. | |
1216 layer->Set3dSortingContextId(layerTree->property_trees() | |
1217 ->transform_tree.Node(transformId) | |
1218 ->sorting_context_id); | |
1219 | |
1220 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); | 1214 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); |
1221 | 1215 |
1222 if (m_extraDataForTestingEnabled) | 1216 if (m_extraDataForTestingEnabled) |
1223 m_extraDataForTesting->contentLayers.push_back(layer); | 1217 m_extraDataForTesting->contentLayers.push_back(layer); |
1224 } | 1218 } |
1225 m_contentLayerClients.clear(); | 1219 m_contentLayerClients.clear(); |
1226 m_contentLayerClients.swap(newContentLayerClients); | 1220 m_contentLayerClients.swap(newContentLayerClients); |
1227 | 1221 |
1228 // Mark the property trees as having been rebuilt. | 1222 // Mark the property trees as having been rebuilt. |
1229 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; | 1223 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; |
1230 layerTree->property_trees()->needs_rebuild = false; | 1224 layerTree->property_trees()->needs_rebuild = false; |
1231 layerTree->property_trees()->ResetCachedData(); | 1225 layerTree->property_trees()->ResetCachedData(); |
1232 } | 1226 } |
1233 | 1227 |
1234 #ifndef NDEBUG | 1228 #ifndef NDEBUG |
1235 void PaintArtifactCompositor::showDebugData() { | 1229 void PaintArtifactCompositor::showDebugData() { |
1236 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) | 1230 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) |
1237 ->toPrettyJSONString() | 1231 ->toPrettyJSONString() |
1238 .utf8() | 1232 .utf8() |
1239 .data(); | 1233 .data(); |
1240 } | 1234 } |
1241 #endif | 1235 #endif |
1242 | 1236 |
1243 } // namespace blink | 1237 } // namespace blink |
OLD | NEW |