OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 void SwitchCCLayerForTest(); | 404 void SwitchCCLayerForTest(); |
405 | 405 |
406 const cc::Region& damaged_region_for_testing() const { | 406 const cc::Region& damaged_region_for_testing() const { |
407 return damaged_region_; | 407 return damaged_region_; |
408 } | 408 } |
409 | 409 |
410 const gfx::Size& frame_size_in_dip_for_testing() const { | 410 const gfx::Size& frame_size_in_dip_for_testing() const { |
411 return frame_size_in_dip_; | 411 return frame_size_in_dip_; |
412 } | 412 } |
413 | 413 |
414 // Force use of and cache render surface. Note that this also disables | |
415 // occlusion culling in favor of efficient caching. This should | |
416 // only be used when paying the cost of creating a render | |
417 // surface even if layer is invisible is not a problem. | |
reveman
2017/07/14 19:36:27
This explains it perfectly. Thanks!
| |
418 void SetCacheRenderSurface(bool cache_render_surface); | |
419 | |
414 private: | 420 private: |
415 friend class LayerOwner; | 421 friend class LayerOwner; |
416 class LayerMirror; | 422 class LayerMirror; |
417 | 423 |
418 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 424 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
419 | 425 |
420 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 426 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
421 // StackBelow(). | 427 // StackBelow(). |
422 void StackRelativeTo(Layer* child, Layer* other, bool above); | 428 void StackRelativeTo(Layer* child, Layer* other, bool above); |
423 | 429 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 580 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
575 // or SetTextureMailbox was called. | 581 // or SetTextureMailbox was called. |
576 gfx::Size frame_size_in_dip_; | 582 gfx::Size frame_size_in_dip_; |
577 | 583 |
578 DISALLOW_COPY_AND_ASSIGN(Layer); | 584 DISALLOW_COPY_AND_ASSIGN(Layer); |
579 }; | 585 }; |
580 | 586 |
581 } // namespace ui | 587 } // namespace ui |
582 | 588 |
583 #endif // UI_COMPOSITOR_LAYER_H_ | 589 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |