Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| index 3db6fc0f2883d23c83dddc6c373dae20bbab3318..b6c86a23a00fbd211631f13af3355f38b5b3ba16 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp |
| @@ -62,6 +62,8 @@ static std::unique_ptr<JSONArray> sizeAsJSONArray(const T& size) { |
| return array; |
| } |
| +static int sPropertyTreeSequenceNumber = 1; |
|
pdr.
2017/02/28 17:44:58
Can you add a short comment here describing what t
wkorman
2017/02/28 20:58:47
Done.
|
| + |
| class PaintArtifactCompositor::ContentLayerClientImpl |
| : public cc::ContentLayerClient { |
| WTF_MAKE_NONCOPYABLE(ContentLayerClientImpl); |
| @@ -696,11 +698,12 @@ void PaintArtifactCompositor::update( |
| m_extraDataForTesting = WTF::wrapUnique(new ExtraDataForTesting); |
| m_rootLayer->RemoveAllChildren(); |
| - m_rootLayer->set_property_tree_sequence_number( |
| - PropertyTreeManager::kPropertyTreeSequenceNumber); |
| + |
| + m_rootLayer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber); |
| PropertyTreeManager propertyTreeManager(*layerTreeHost->property_trees(), |
| - m_rootLayer.get()); |
| + m_rootLayer.get(), |
| + sPropertyTreeSequenceNumber); |
| Vector<PendingLayer, 0> pendingLayers; |
| collectPendingLayers(paintArtifact, pendingLayers, geometryMapper); |
| @@ -725,8 +728,7 @@ void PaintArtifactCompositor::update( |
| layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId()); |
| m_rootLayer->AddChild(layer); |
| - layer->set_property_tree_sequence_number( |
| - PropertyTreeManager::kPropertyTreeSequenceNumber); |
| + layer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber); |
| layer->SetTransformTreeIndex(transformId); |
| layer->SetClipTreeIndex(clipId); |
| layer->SetEffectTreeIndex(effectId); |
| @@ -742,9 +744,11 @@ void PaintArtifactCompositor::update( |
| // Mark the property trees as having been rebuilt. |
| layerTreeHost->property_trees()->sequence_number = |
| - PropertyTreeManager::kPropertyTreeSequenceNumber; |
| + sPropertyTreeSequenceNumber; |
| layerTreeHost->property_trees()->needs_rebuild = false; |
| layerTreeHost->property_trees()->ResetCachedData(); |
| + |
| + sPropertyTreeSequenceNumber++; |
| } |
| #ifndef NDEBUG |