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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 void SwitchCCLayerForTest(); | 402 void SwitchCCLayerForTest(); |
403 | 403 |
404 const cc::Region& damaged_region_for_testing() const { | 404 const cc::Region& damaged_region_for_testing() const { |
405 return damaged_region_; | 405 return damaged_region_; |
406 } | 406 } |
407 | 407 |
408 const gfx::Size& frame_size_in_dip_for_testing() const { | 408 const gfx::Size& frame_size_in_dip_for_testing() const { |
409 return frame_size_in_dip_; | 409 return frame_size_in_dip_; |
410 } | 410 } |
411 | 411 |
| 412 // Force use of and cache render surface. Note that this also disables |
| 413 // occlusion culling in favor of efficient caching. This should |
| 414 // only be used when paying the cost of creating a render |
| 415 // surface even if layer is invisible is not a problem. |
| 416 void SetCacheRenderSurface(bool cache_render_surface); |
| 417 |
412 private: | 418 private: |
413 friend class LayerOwner; | 419 friend class LayerOwner; |
414 class LayerMirror; | 420 class LayerMirror; |
415 | 421 |
416 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 422 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
417 | 423 |
418 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 424 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
419 // StackBelow(). | 425 // StackBelow(). |
420 void StackRelativeTo(Layer* child, Layer* other, bool above); | 426 void StackRelativeTo(Layer* child, Layer* other, bool above); |
421 | 427 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 578 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
573 // or SetTextureMailbox was called. | 579 // or SetTextureMailbox was called. |
574 gfx::Size frame_size_in_dip_; | 580 gfx::Size frame_size_in_dip_; |
575 | 581 |
576 DISALLOW_COPY_AND_ASSIGN(Layer); | 582 DISALLOW_COPY_AND_ASSIGN(Layer); |
577 }; | 583 }; |
578 | 584 |
579 } // namespace ui | 585 } // namespace ui |
580 | 586 |
581 #endif // UI_COMPOSITOR_LAYER_H_ | 587 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |