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

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: Progress. Created 3 years, 9 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 if (createNew) 446 if (createNew)
447 pendingLayers.push_back(PendingLayer(paintChunk)); 447 pendingLayers.push_back(PendingLayer(paintChunk));
448 } 448 }
449 } 449 }
450 450
451 void PaintArtifactCompositor::update( 451 void PaintArtifactCompositor::update(
452 const PaintArtifact& paintArtifact, 452 const PaintArtifact& paintArtifact,
453 RasterInvalidationTrackingMap<const PaintChunk>* rasterChunkInvalidations, 453 RasterInvalidationTrackingMap<const PaintChunk>* rasterChunkInvalidations,
454 bool storeDebugInfo, 454 bool storeDebugInfo,
455 GeometryMapper& geometryMapper) { 455 GeometryMapper& geometryMapper,
456 CompositorElementIdSet& compositedAnimationElementIds) {
456 #ifndef NDEBUG 457 #ifndef NDEBUG
457 storeDebugInfo = true; 458 storeDebugInfo = true;
458 #endif 459 #endif
459 460
460 DCHECK(m_rootLayer); 461 DCHECK(m_rootLayer);
461 462
462 cc::LayerTreeHost* layerTreeHost = m_rootLayer->layer_tree_host(); 463 cc::LayerTreeHost* layerTreeHost = m_rootLayer->layer_tree_host();
463 464
464 // The tree will be null after detaching and this update can be ignored. 465 // The tree will be null after detaching and this update can be ignored.
465 // See: WebViewImpl::detachPaintArtifactCompositor(). 466 // See: WebViewImpl::detachPaintArtifactCompositor().
(...skipping 24 matching lines...) Expand all
490 491
491 const auto* transform = pendingLayer.propertyTreeState.transform(); 492 const auto* transform = pendingLayer.propertyTreeState.transform();
492 int transformId = 493 int transformId =
493 propertyTreeManager.ensureCompositorTransformNode(transform); 494 propertyTreeManager.ensureCompositorTransformNode(transform);
494 int clipId = propertyTreeManager.ensureCompositorClipNode( 495 int clipId = propertyTreeManager.ensureCompositorClipNode(
495 pendingLayer.propertyTreeState.clip()); 496 pendingLayer.propertyTreeState.clip());
496 int effectId = propertyTreeManager.switchToEffectNode( 497 int effectId = propertyTreeManager.switchToEffectNode(
497 *pendingLayer.propertyTreeState.effect()); 498 *pendingLayer.propertyTreeState.effect());
498 499
499 layer->set_offset_to_transform_parent(layerOffset); 500 layer->set_offset_to_transform_parent(layerOffset);
500 layer->SetElementId(pendingLayer.propertyTreeState.compositorElementId()); 501 CompositorElementId elementId =
502 pendingLayer.propertyTreeState.compositorElementId();
503 if (elementId) {
504 layer->SetElementId(elementId);
505 compositedAnimationElementIds.insert(elementId);
506 }
501 507
502 m_rootLayer->AddChild(layer); 508 m_rootLayer->AddChild(layer);
503 layer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber); 509 layer->set_property_tree_sequence_number(sPropertyTreeSequenceNumber);
504 layer->SetTransformTreeIndex(transformId); 510 layer->SetTransformTreeIndex(transformId);
505 layer->SetClipTreeIndex(clipId); 511 layer->SetClipTreeIndex(clipId);
506 layer->SetEffectTreeIndex(effectId); 512 layer->SetEffectTreeIndex(effectId);
507 propertyTreeManager.updateLayerScrollMapping(layer.get(), transform); 513 propertyTreeManager.updateLayerScrollMapping(layer.get(), transform);
508 514
509 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden); 515 layer->SetShouldCheckBackfaceVisibility(pendingLayer.backfaceHidden);
510 516
(...skipping 15 matching lines...) Expand all
526 #ifndef NDEBUG 532 #ifndef NDEBUG
527 void PaintArtifactCompositor::showDebugData() { 533 void PaintArtifactCompositor::showDebugData() {
528 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 534 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
529 ->toPrettyJSONString() 535 ->toPrettyJSONString()
530 .utf8() 536 .utf8()
531 .data(); 537 .data();
532 } 538 }
533 #endif 539 #endif
534 540
535 } // namespace blink 541 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698