Chromium Code Reviews| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 void SwitchCCLayerForTest(); | 398 void SwitchCCLayerForTest(); |
| 399 | 399 |
| 400 const cc::Region& damaged_region_for_testing() const { | 400 const cc::Region& damaged_region_for_testing() const { |
| 401 return damaged_region_; | 401 return damaged_region_; |
| 402 } | 402 } |
| 403 | 403 |
| 404 const gfx::Size& frame_size_in_dip_for_testing() const { | 404 const gfx::Size& frame_size_in_dip_for_testing() const { |
| 405 return frame_size_in_dip_; | 405 return frame_size_in_dip_; |
| 406 } | 406 } |
| 407 | 407 |
| 408 // Force use of render surface. Note that this also disables | |
| 409 // occlusion culling in favor of efficient caching. This should | |
| 410 // only be used when paying the cost of creating a render | |
| 411 // surface even if layer is invisible is not a problem. | |
| 412 void SetForceRenderSurface(bool force); | |
|
danakj
2017/05/09 14:56:54
This seems like something the Layer should set whe
reveman
2017/05/09 15:49:25
The main use-case is to enable this when animating
danakj
2017/05/09 15:51:51
Background filters are implemented via a separate
reveman
2017/05/10 13:06:17
Animations for now sounds good. There might be som
wutao
2017/05/11 19:36:35
Acknowledged.
| |
| 413 | |
| 408 private: | 414 private: |
| 409 friend class LayerOwner; | 415 friend class LayerOwner; |
| 410 class LayerMirror; | 416 class LayerMirror; |
| 411 | 417 |
| 412 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 418 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
| 413 | 419 |
| 414 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 420 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
| 415 // StackBelow(). | 421 // StackBelow(). |
| 416 void StackRelativeTo(Layer* child, Layer* other, bool above); | 422 void StackRelativeTo(Layer* child, Layer* other, bool above); |
| 417 | 423 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 568 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 574 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 569 // or SetTextureMailbox was called. | 575 // or SetTextureMailbox was called. |
| 570 gfx::Size frame_size_in_dip_; | 576 gfx::Size frame_size_in_dip_; |
| 571 | 577 |
| 572 DISALLOW_COPY_AND_ASSIGN(Layer); | 578 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 573 }; | 579 }; |
| 574 | 580 |
| 575 } // namespace ui | 581 } // namespace ui |
| 576 | 582 |
| 577 #endif // UI_COMPOSITOR_LAYER_H_ | 583 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |