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

Side by Side Diff: cc/layers/layer.h

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 #ifndef CC_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); 460 virtual void RunMicroBenchmark(MicroBenchmark* benchmark);
461 461
462 void Set3dSortingContextId(int id); 462 void Set3dSortingContextId(int id);
463 int sorting_context_id() const { return sorting_context_id_; } 463 int sorting_context_id() const { return sorting_context_id_; }
464 464
465 protected: 465 protected:
466 friend class LayerImpl; 466 friend class LayerImpl;
467 friend class TreeSynchronizer; 467 friend class TreeSynchronizer;
468 virtual ~Layer(); 468 ~Layer() override;
469 469
470 Layer(); 470 Layer();
471 471
472 // These SetNeeds functions are in order of severity of update: 472 // These SetNeeds functions are in order of severity of update:
473 // 473 //
474 // Called when this layer has been modified in some way, but isn't sure 474 // Called when this layer has been modified in some way, but isn't sure
475 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers 475 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers
476 // before it knows whether or not a commit is required. 476 // before it knows whether or not a commit is required.
477 void SetNeedsUpdate(); 477 void SetNeedsUpdate();
478 // Called when a property has been modified in a way that the layer 478 // Called when a property has been modified in a way that the layer
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 void SetParent(Layer* layer); 545 void SetParent(Layer* layer);
546 bool DescendantIsFixedToContainerLayer() const; 546 bool DescendantIsFixedToContainerLayer() const;
547 547
548 // Returns the index of the child or -1 if not found. 548 // Returns the index of the child or -1 if not found.
549 int IndexOfChild(const Layer* reference); 549 int IndexOfChild(const Layer* reference);
550 550
551 // This should only be called from RemoveFromParent(). 551 // This should only be called from RemoveFromParent().
552 void RemoveChildOrDependent(Layer* child); 552 void RemoveChildOrDependent(Layer* child);
553 553
554 // LayerAnimationValueProvider implementation. 554 // LayerAnimationValueProvider implementation.
555 virtual gfx::ScrollOffset ScrollOffsetForAnimation() const override; 555 gfx::ScrollOffset ScrollOffsetForAnimation() const override;
556 556
557 // LayerAnimationValueObserver implementation. 557 // LayerAnimationValueObserver implementation.
558 virtual void OnFilterAnimated(const FilterOperations& filters) override; 558 void OnFilterAnimated(const FilterOperations& filters) override;
559 virtual void OnOpacityAnimated(float opacity) override; 559 void OnOpacityAnimated(float opacity) override;
560 virtual void OnTransformAnimated(const gfx::Transform& transform) override; 560 void OnTransformAnimated(const gfx::Transform& transform) override;
561 virtual void OnScrollOffsetAnimated( 561 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
562 const gfx::ScrollOffset& scroll_offset) override; 562 void OnAnimationWaitingForDeletion() override;
563 virtual void OnAnimationWaitingForDeletion() override; 563 bool IsActive() const override;
564 virtual bool IsActive() const override;
565 564
566 // If this layer has a scroll parent, it removes |this| from its list of 565 // If this layer has a scroll parent, it removes |this| from its list of
567 // scroll children. 566 // scroll children.
568 void RemoveFromScrollTree(); 567 void RemoveFromScrollTree();
569 568
570 // If this layer has a clip parent, it removes |this| from its list of clip 569 // If this layer has a clip parent, it removes |this| from its list of clip
571 // children. 570 // children.
572 void RemoveFromClipTree(); 571 void RemoveFromClipTree();
573 572
574 LayerList children_; 573 LayerList children_;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 DrawProperties<Layer> draw_properties_; 640 DrawProperties<Layer> draw_properties_;
642 641
643 PaintProperties paint_properties_; 642 PaintProperties paint_properties_;
644 643
645 DISALLOW_COPY_AND_ASSIGN(Layer); 644 DISALLOW_COPY_AND_ASSIGN(Layer);
646 }; 645 };
647 646
648 } // namespace cc 647 } // namespace cc
649 648
650 #endif // CC_LAYERS_LAYER_H_ 649 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer_impl.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698