| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 const gfx::Size& frame_size_in_dip_for_testing() const { | 417 const gfx::Size& frame_size_in_dip_for_testing() const { |
| 418 return frame_size_in_dip_; | 418 return frame_size_in_dip_; |
| 419 } | 419 } |
| 420 | 420 |
| 421 // Force use of and cache render surface. Note that this also disables | 421 // Force use of and cache render surface. Note that this also disables |
| 422 // occlusion culling in favor of efficient caching. This should | 422 // occlusion culling in favor of efficient caching. This should |
| 423 // only be used when paying the cost of creating a render | 423 // only be used when paying the cost of creating a render |
| 424 // surface even if layer is invisible is not a problem. | 424 // surface even if layer is invisible is not a problem. |
| 425 void SetCacheRenderSurface(bool cache_render_surface); | 425 void SetCacheRenderSurface(bool cache_render_surface); |
| 426 | 426 |
| 427 // The back link from the mask layer to it's associated masked layer. |
| 428 // We keep this reference for the case that if the mask layer gets deleted |
| 429 // while attached to the main layer before the main layer is deleted. |
| 430 const Layer* layer_mask_back_link() const { return layer_mask_back_link_; } |
| 431 |
| 427 private: | 432 private: |
| 428 friend class LayerOwner; | 433 friend class LayerOwner; |
| 429 class LayerMirror; | 434 class LayerMirror; |
| 430 | 435 |
| 431 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 436 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
| 432 | 437 |
| 433 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 438 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
| 434 // StackBelow(). | 439 // StackBelow(). |
| 435 void StackRelativeTo(Layer* child, Layer* other, bool above); | 440 void StackRelativeTo(Layer* child, Layer* other, bool above); |
| 436 | 441 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 593 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 589 // or SetTextureMailbox was called. | 594 // or SetTextureMailbox was called. |
| 590 gfx::Size frame_size_in_dip_; | 595 gfx::Size frame_size_in_dip_; |
| 591 | 596 |
| 592 DISALLOW_COPY_AND_ASSIGN(Layer); | 597 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 593 }; | 598 }; |
| 594 | 599 |
| 595 } // namespace ui | 600 } // namespace ui |
| 596 | 601 |
| 597 #endif // UI_COMPOSITOR_LAYER_H_ | 602 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |