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

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

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: Update expectations. Created 3 years, 8 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 <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include "cc/layers/content_layer_client.h" 10 #include "cc/layers/content_layer_client.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 Vector<PaintChunk>::const_iterator cursor = 582 Vector<PaintChunk>::const_iterator cursor =
583 paintArtifact.paintChunks().begin(); 583 paintArtifact.paintChunks().begin();
584 layerizeGroup(paintArtifact, pendingLayers, *EffectPaintPropertyNode::root(), 584 layerizeGroup(paintArtifact, pendingLayers, *EffectPaintPropertyNode::root(),
585 cursor); 585 cursor);
586 DCHECK_EQ(paintArtifact.paintChunks().end(), cursor); 586 DCHECK_EQ(paintArtifact.paintChunks().end(), cursor);
587 } 587 }
588 588
589 void PaintArtifactCompositor::update( 589 void PaintArtifactCompositor::update(
590 const PaintArtifact& paintArtifact, 590 const PaintArtifact& paintArtifact,
591 RasterInvalidationTrackingMap<const PaintChunk>* rasterChunkInvalidations, 591 RasterInvalidationTrackingMap<const PaintChunk>* rasterChunkInvalidations,
592 bool storeDebugInfo) { 592 bool storeDebugInfo,
593 CompositorElementIdSet& compositedElementIds) {
593 #ifndef NDEBUG 594 #ifndef NDEBUG
594 storeDebugInfo = true; 595 storeDebugInfo = true;
595 #endif 596 #endif
596 597
597 DCHECK(m_rootLayer); 598 DCHECK(m_rootLayer);
598 599
599 cc::LayerTreeHost* layerTreeHost = m_rootLayer->layer_tree_host(); 600 cc::LayerTreeHost* layerTreeHost = m_rootLayer->layer_tree_host();
600 601
601 // The tree will be null after detaching and this update can be ignored. 602 // The tree will be null after detaching and this update can be ignored.
602 // See: WebViewImpl::detachPaintArtifactCompositor(). 603 // See: WebViewImpl::detachPaintArtifactCompositor().
(...skipping 24 matching lines...) Expand all
627 628
628 const auto* transform = pendingLayer.propertyTreeState.transform(); 629 const auto* transform = pendingLayer.propertyTreeState.transform();
629 int transformId = 630 int transformId =
630 propertyTreeManager.ensureCompositorTransformNode(transform); 631 propertyTreeManager.ensureCompositorTransformNode(transform);
631 int clipId = propertyTreeManager.ensureCompositorClipNode( 632 int clipId = propertyTreeManager.ensureCompositorClipNode(
632 pendingLayer.propertyTreeState.clip()); 633 pendingLayer.propertyTreeState.clip());
633 int effectId = propertyTreeManager.switchToEffectNode( 634 int effectId = propertyTreeManager.switchToEffectNode(
634 *pendingLayer.propertyTreeState.effect()); 635 *pendingLayer.propertyTreeState.effect());
635 636
636 layer->set_offset_to_transform_parent(layerOffset); 637 layer->set_offset_to_transform_parent(layerOffset);
637 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId()); 638 CompositorElementId elementId =
639 pendingLayer.propertyTreeState.compositorElementId();
640 if (elementId) {
641 layer->SetElementId(elementId);
642 compositedElementIds.insert(elementId);
643 }
638 644
639 m_rootLayer->AddChild(layer); 645 m_rootLayer->AddChild(layer);
640 layer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber); 646 layer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber);
641 layer->SetTransformTreeIndex(transformId); 647 layer->SetTransformTreeIndex(transformId);
642 layer->SetClipTreeIndex(clipId); 648 layer->SetClipTreeIndex(clipId);
643 layer->SetEffectTreeIndex(effectId); 649 layer->SetEffectTreeIndex(effectId);
644 propertyTreeManager.updateLayerScrollMapping(layer.get(), transform); 650 propertyTreeManager.updateLayerScrollMapping(layer.get(), transform);
645 651
646 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); 652 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
647 653
(...skipping 15 matching lines...) Expand all
663 #ifndef NDEBUG 669 #ifndef NDEBUG
664 void PaintArtifactCompositor::showDebugData() { 670 void PaintArtifactCompositor::showDebugData() {
665 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 671 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
666 ->toPrettyJSONString() 672 ->toPrettyJSONString()
667 .utf8() 673 .utf8()
668 .data(); 674 .data();
669 } 675 }
670 #endif 676 #endif
671 677
672 } // namespace blink 678 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698