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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 void RemoveFromClipTree(); | 498 void RemoveFromClipTree(); |
499 | 499 |
500 // When we detach or attach layer to new LayerTreeHost, all property trees' | 500 // When we detach or attach layer to new LayerTreeHost, all property trees' |
501 // indices becomes invalid. | 501 // indices becomes invalid. |
502 void InvalidatePropertyTreesIndices(); | 502 void InvalidatePropertyTreesIndices(); |
503 | 503 |
504 // This is set whenever a property changed on layer that affects whether this | 504 // This is set whenever a property changed on layer that affects whether this |
505 // layer should own a property tree node or not. | 505 // layer should own a property tree node or not. |
506 void SetPropertyTreesNeedRebuild(); | 506 void SetPropertyTreesNeedRebuild(); |
507 | 507 |
| 508 // Fast-path for |SetScrollOffset| and |SetScrollOffsetFromImplSide| to |
| 509 // directly update scroll offset values in the property tree without needing a |
| 510 // full property tree update. If property trees do not exist yet, ensures |
| 511 // they are marked as needing to be rebuilt. |
| 512 void UpdateScrollOffset(const gfx::ScrollOffset&); |
| 513 |
508 // Encapsulates all data, callbacks or interfaces received from the embedder. | 514 // Encapsulates all data, callbacks or interfaces received from the embedder. |
509 // TODO(khushalsagar): This is only valid when PropertyTrees are built | 515 // TODO(khushalsagar): This is only valid when PropertyTrees are built |
510 // internally in cc. Update this for the SPv2 path where blink generates | 516 // internally in cc. Update this for the SPv2 path where blink generates |
511 // PropertyTrees. | 517 // PropertyTrees. |
512 struct Inputs { | 518 struct Inputs { |
513 explicit Inputs(int layer_id); | 519 explicit Inputs(int layer_id); |
514 ~Inputs(); | 520 ~Inputs(); |
515 | 521 |
516 int layer_id; | 522 int layer_id; |
517 | 523 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 // These all act like draw properties, so don't need push properties. | 635 // These all act like draw properties, so don't need push properties. |
630 gfx::Rect visible_layer_rect_; | 636 gfx::Rect visible_layer_rect_; |
631 size_t num_unclipped_descendants_; | 637 size_t num_unclipped_descendants_; |
632 | 638 |
633 DISALLOW_COPY_AND_ASSIGN(Layer); | 639 DISALLOW_COPY_AND_ASSIGN(Layer); |
634 }; | 640 }; |
635 | 641 |
636 } // namespace cc | 642 } // namespace cc |
637 | 643 |
638 #endif // CC_LAYERS_LAYER_H_ | 644 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |