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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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/PropertyTreeManager.h" 5 #include "platform/graphics/compositing/PropertyTreeManager.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/trees/clip_node.h" 8 #include "cc/trees/clip_node.h"
9 #include "cc/trees/effect_node.h" 9 #include "cc/trees/effect_node.h"
10 #include "cc/trees/property_tree.h" 10 #include "cc/trees/property_tree.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return; 347 return;
348 DCHECK(nextEffect); 348 DCHECK(nextEffect);
349 349
350 buildEffectNodesRecursively(nextEffect->parent()); 350 buildEffectNodesRecursively(nextEffect->parent());
351 DCHECK_EQ(nextEffect->parent(), currentEffectNode()); 351 DCHECK_EQ(nextEffect->parent(), currentEffectNode());
352 352
353 #if DCHECK_IS_ON() 353 #if DCHECK_IS_ON()
354 DCHECK(!m_effectNodesConverted.contains(nextEffect)) 354 DCHECK(!m_effectNodesConverted.contains(nextEffect))
355 << "Malformed paint artifact. Paint chunks under the same effect should " 355 << "Malformed paint artifact. Paint chunks under the same effect should "
356 "be contiguous."; 356 "be contiguous.";
357 m_effectNodesConverted.add(nextEffect); 357 m_effectNodesConverted.insert(nextEffect);
358 #endif 358 #endif
359 359
360 // An effect node can't omit render surface if it has child with exotic 360 // An effect node can't omit render surface if it has child with exotic
361 // blending mode. See comments below for more detail. 361 // blending mode. See comments below for more detail.
362 // TODO(crbug.com/504464): Remove premature optimization here. 362 // TODO(crbug.com/504464): Remove premature optimization here.
363 if (nextEffect->blendMode() != SkBlendMode::kSrcOver) { 363 if (nextEffect->blendMode() != SkBlendMode::kSrcOver) {
364 effectTree() 364 effectTree()
365 .Node(getCurrentCompositorEffectNodeIndex()) 365 .Node(getCurrentCompositorEffectNodeIndex())
366 ->has_render_surface = true; 366 ->has_render_surface = true;
367 } 367 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 m_effectStack.push_back(BlinkEffectAndCcIdPair{nextEffect, effectNode.id}); 404 m_effectStack.push_back(BlinkEffectAndCcIdPair{nextEffect, effectNode.id});
405 405
406 dummyLayer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber); 406 dummyLayer->set_property_tree_sequence_number(kPropertyTreeSequenceNumber);
407 dummyLayer->SetTransformTreeIndex(kSecondaryRootNodeId); 407 dummyLayer->SetTransformTreeIndex(kSecondaryRootNodeId);
408 dummyLayer->SetClipTreeIndex(outputClipId); 408 dummyLayer->SetClipTreeIndex(outputClipId);
409 dummyLayer->SetEffectTreeIndex(effectNode.id); 409 dummyLayer->SetEffectTreeIndex(effectNode.id);
410 dummyLayer->SetScrollTreeIndex(kRealRootNodeId); 410 dummyLayer->SetScrollTreeIndex(kRealRootNodeId);
411 } 411 }
412 412
413 } // namespace blink 413 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698