OLD | NEW |
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 #include <vector> | 10 #include <vector> |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 } | 512 } |
513 | 513 |
514 const gfx::Rect& visible_layer_rect() const { return visible_layer_rect_; } | 514 const gfx::Rect& visible_layer_rect() const { return visible_layer_rect_; } |
515 void set_visible_layer_rect(const gfx::Rect& rect) { | 515 void set_visible_layer_rect(const gfx::Rect& rect) { |
516 visible_layer_rect_ = rect; | 516 visible_layer_rect_ = rect; |
517 } | 517 } |
518 | 518 |
519 const gfx::Rect& clip_rect() const { return clip_rect_; } | 519 const gfx::Rect& clip_rect() const { return clip_rect_; } |
520 void set_clip_rect(const gfx::Rect& rect) { clip_rect_ = rect; } | 520 void set_clip_rect(const gfx::Rect& rect) { clip_rect_ = rect; } |
521 | 521 |
| 522 // This should only be called during BeginMainFrame since it does not trigger |
| 523 // a Commit. This is called right after property tree being built and should |
| 524 // not trigger property tree rebuild. |
| 525 void SetHasRenderSurface(bool has_render_surface); |
522 bool has_render_surface() const { | 526 bool has_render_surface() const { |
523 return has_render_surface_; | 527 return has_render_surface_; |
524 } | 528 } |
525 | 529 |
526 // Sets new frame timing requests for this layer. | 530 // Sets new frame timing requests for this layer. |
527 void SetFrameTimingRequests(const std::vector<FrameTimingRequest>& requests); | 531 void SetFrameTimingRequests(const std::vector<FrameTimingRequest>& requests); |
528 | 532 |
529 // Accessor for unit tests | 533 // Accessor for unit tests |
530 const std::vector<FrameTimingRequest>& FrameTimingRequests() const { | 534 const std::vector<FrameTimingRequest>& FrameTimingRequests() const { |
531 return frame_timing_requests_; | 535 return frame_timing_requests_; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 // space. 0 is a special value that means this layer will not be sorted and | 658 // space. 0 is a special value that means this layer will not be sorted and |
655 // will be drawn in paint order. | 659 // will be drawn in paint order. |
656 int sorting_context_id_; | 660 int sorting_context_id_; |
657 | 661 |
658 private: | 662 private: |
659 friend class base::RefCounted<Layer>; | 663 friend class base::RefCounted<Layer>; |
660 friend class LayerTreeHostCommon; | 664 friend class LayerTreeHostCommon; |
661 void SetParent(Layer* layer); | 665 void SetParent(Layer* layer); |
662 bool DescendantIsFixedToContainerLayer() const; | 666 bool DescendantIsFixedToContainerLayer() const; |
663 | 667 |
664 // This should only be called during BeginMainFrame since it does not | |
665 // trigger a Commit. | |
666 void SetHasRenderSurface(bool has_render_surface); | |
667 | |
668 // This should only be called from RemoveFromParent(). | 668 // This should only be called from RemoveFromParent(). |
669 void RemoveChildOrDependent(Layer* child); | 669 void RemoveChildOrDependent(Layer* child); |
670 | 670 |
671 // If this layer has a scroll parent, it removes |this| from its list of | 671 // If this layer has a scroll parent, it removes |this| from its list of |
672 // scroll children. | 672 // scroll children. |
673 void RemoveFromScrollTree(); | 673 void RemoveFromScrollTree(); |
674 | 674 |
675 // If this layer has a clip parent, it removes |this| from its list of clip | 675 // If this layer has a clip parent, it removes |this| from its list of clip |
676 // children. | 676 // children. |
677 void RemoveFromClipTree(); | 677 void RemoveFromClipTree(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 | 775 |
776 std::vector<FrameTimingRequest> frame_timing_requests_; | 776 std::vector<FrameTimingRequest> frame_timing_requests_; |
777 bool frame_timing_requests_dirty_; | 777 bool frame_timing_requests_dirty_; |
778 | 778 |
779 DISALLOW_COPY_AND_ASSIGN(Layer); | 779 DISALLOW_COPY_AND_ASSIGN(Layer); |
780 }; | 780 }; |
781 | 781 |
782 } // namespace cc | 782 } // namespace cc |
783 | 783 |
784 #endif // CC_LAYERS_LAYER_H_ | 784 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |