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

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

Issue 2808463003: SPv2: Limit compositor element id application to a single layer. (Closed)
Patch Set: Revise expectations slightly. 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 const auto* transform = pending_layer.property_tree_state.Transform(); 637 const auto* transform = pending_layer.property_tree_state.Transform();
638 int transform_id = 638 int transform_id =
639 property_tree_manager.EnsureCompositorTransformNode(transform); 639 property_tree_manager.EnsureCompositorTransformNode(transform);
640 int clip_id = property_tree_manager.EnsureCompositorClipNode( 640 int clip_id = property_tree_manager.EnsureCompositorClipNode(
641 pending_layer.property_tree_state.Clip()); 641 pending_layer.property_tree_state.Clip());
642 int effect_id = property_tree_manager.SwitchToEffectNode( 642 int effect_id = property_tree_manager.SwitchToEffectNode(
643 *pending_layer.property_tree_state.Effect()); 643 *pending_layer.property_tree_state.Effect());
644 644
645 layer->set_offset_to_transform_parent(layer_offset); 645 layer->set_offset_to_transform_parent(layer_offset);
646 CompositorElementId element_id = 646 CompositorElementId element_id =
647 pending_layer.property_tree_state.GetCompositorElementId(); 647 pending_layer.property_tree_state.GetCompositorElementId(
648 composited_element_ids);
648 if (element_id) { 649 if (element_id) {
649 layer->SetElementId(element_id); 650 layer->SetElementId(element_id);
650 composited_element_ids.insert(element_id); 651 composited_element_ids.insert(element_id);
651 } 652 }
652 653
653 root_layer_->AddChild(layer); 654 root_layer_->AddChild(layer);
654 layer->set_property_tree_sequence_number(g_s_property_tree_sequence_number); 655 layer->set_property_tree_sequence_number(g_s_property_tree_sequence_number);
655 layer->SetTransformTreeIndex(transform_id); 656 layer->SetTransformTreeIndex(transform_id);
656 layer->SetClipTreeIndex(clip_id); 657 layer->SetClipTreeIndex(clip_id);
657 layer->SetEffectTreeIndex(effect_id); 658 layer->SetEffectTreeIndex(effect_id);
(...skipping 19 matching lines...) Expand all
677 #ifndef NDEBUG 678 #ifndef NDEBUG
678 void PaintArtifactCompositor::ShowDebugData() { 679 void PaintArtifactCompositor::ShowDebugData() {
679 LOG(ERROR) << LayersAsJSON(kLayerTreeIncludesDebugInfo) 680 LOG(ERROR) << LayersAsJSON(kLayerTreeIncludesDebugInfo)
680 ->ToPrettyJSONString() 681 ->ToPrettyJSONString()
681 .Utf8() 682 .Utf8()
682 .Data(); 683 .Data();
683 } 684 }
684 #endif 685 #endif
685 686
686 } // namespace blink 687 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698