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

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

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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 "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/picture_layer.h" 9 #include "cc/layers/picture_layer.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 void setupRootTransformNode(); 365 void setupRootTransformNode();
366 void setupRootClipNode(); 366 void setupRootClipNode();
367 void setupRootEffectNode(); 367 void setupRootEffectNode();
368 void setupRootScrollNode(); 368 void setupRootScrollNode();
369 369
370 int compositorIdForTransformNode(const TransformPaintPropertyNode*); 370 int compositorIdForTransformNode(const TransformPaintPropertyNode*);
371 int compositorIdForClipNode(const ClipPaintPropertyNode*); 371 int compositorIdForClipNode(const ClipPaintPropertyNode*);
372 int switchToEffectNode(const EffectPaintPropertyNode& nextEffect); 372 int switchToEffectNode(const EffectPaintPropertyNode& nextEffect);
373 int compositorIdForCurrentEffectNode() const { 373 int compositorIdForCurrentEffectNode() const {
374 return m_effectStack.last().id; 374 return m_effectStack.back().id;
375 } 375 }
376 int compositorIdForScrollNode(const ScrollPaintPropertyNode*); 376 int compositorIdForScrollNode(const ScrollPaintPropertyNode*);
377 377
378 // Scroll offset has special treatment in the transform and scroll trees. 378 // Scroll offset has special treatment in the transform and scroll trees.
379 void updateScrollOffset(int layerId, int scrollId); 379 void updateScrollOffset(int layerId, int scrollId);
380 380
381 private: 381 private:
382 void buildEffectNodesRecursively(const EffectPaintPropertyNode* nextEffect); 382 void buildEffectNodesRecursively(const EffectPaintPropertyNode* nextEffect);
383 383
384 cc::TransformTree& transformTree() { return m_propertyTrees.transform_tree; } 384 cc::TransformTree& transformTree() { return m_propertyTrees.transform_tree; }
385 cc::ClipTree& clipTree() { return m_propertyTrees.clip_tree; } 385 cc::ClipTree& clipTree() { return m_propertyTrees.clip_tree; }
386 cc::EffectTree& effectTree() { return m_propertyTrees.effect_tree; } 386 cc::EffectTree& effectTree() { return m_propertyTrees.effect_tree; }
387 cc::ScrollTree& scrollTree() { return m_propertyTrees.scroll_tree; } 387 cc::ScrollTree& scrollTree() { return m_propertyTrees.scroll_tree; }
388 388
389 const EffectPaintPropertyNode* currentEffectNode() const { 389 const EffectPaintPropertyNode* currentEffectNode() const {
390 return m_effectStack.last().effect; 390 return m_effectStack.back().effect;
391 } 391 }
392 392
393 // Property trees which should be updated by the manager. 393 // Property trees which should be updated by the manager.
394 cc::PropertyTrees& m_propertyTrees; 394 cc::PropertyTrees& m_propertyTrees;
395 395
396 // Layer to which transform "owner" layers should be added. These will not 396 // Layer to which transform "owner" layers should be added. These will not
397 // have any actual children, but at present must exist in the tree. 397 // have any actual children, but at present must exist in the tree.
398 cc::Layer* m_rootLayer; 398 cc::Layer* m_rootLayer;
399 399
400 // Maps from Blink-side property tree nodes to cc property node indices. 400 // Maps from Blink-side property tree nodes to cc property node indices.
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 m_contentLayerClients.clear(); 814 m_contentLayerClients.clear();
815 m_contentLayerClients.swap(newContentLayerClients); 815 m_contentLayerClients.swap(newContentLayerClients);
816 816
817 // Mark the property trees as having been rebuilt. 817 // Mark the property trees as having been rebuilt.
818 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 818 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
819 layerTree->property_trees()->needs_rebuild = false; 819 layerTree->property_trees()->needs_rebuild = false;
820 layerTree->property_trees()->ResetCachedData(); 820 layerTree->property_trees()->ResetCachedData();
821 } 821 }
822 822
823 } // namespace blink 823 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698