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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
386 return num_dependents_need_push_properties_ > 0; | 386 return num_dependents_need_push_properties_ > 0; |
387 } | 387 } |
388 | 388 |
389 protected: | 389 protected: |
390 friend class LayerImpl; | 390 friend class LayerImpl; |
391 friend class TreeSynchronizer; | 391 friend class TreeSynchronizer; |
392 virtual ~Layer(); | 392 virtual ~Layer(); |
393 | 393 |
394 Layer(); | 394 Layer(); |
395 | 395 |
396 // These SetNeeds functions are in order of severity of update: | |
397 // | |
398 // Called when this layer has been modified in some way, but isn't sure | |
399 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers | |
400 // before it knows whether or not a commit is required. | |
401 void SetNeedsUpdate(); | |
402 // Called when a property has been modified in a way that the layer | |
403 // knows immediately that a commit is required. This implies SetNeedsUpdate. | |
396 void SetNeedsCommit(); | 404 void SetNeedsCommit(); |
405 // Called when there's been a change in layer structure. Implies both | |
406 // SetNeedsUpdate and SetNeedsCommit. | |
danakj
2013/07/17 20:53:24
Kinda but not, there's no needs_push_properties()
enne (OOO)
2013/07/18 17:36:37
Done.
| |
397 void SetNeedsFullTreeSync(); | 407 void SetNeedsFullTreeSync(); |
398 bool IsPropertyChangeAllowed() const; | 408 bool IsPropertyChangeAllowed() const; |
399 | 409 |
400 void SetNeedsPushProperties(); | 410 void SetNeedsPushProperties(); |
401 void AddDependentNeedsPushProperties(); | 411 void AddDependentNeedsPushProperties(); |
402 void RemoveDependentNeedsPushProperties(); | 412 void RemoveDependentNeedsPushProperties(); |
403 bool parent_should_know_need_push_properties() const { | 413 bool parent_should_know_need_push_properties() const { |
404 return needs_push_properties() || descendant_needs_push_properties(); | 414 return needs_push_properties() || descendant_needs_push_properties(); |
405 } | 415 } |
406 | 416 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
513 DrawProperties<Layer, RenderSurface> draw_properties_; | 523 DrawProperties<Layer, RenderSurface> draw_properties_; |
514 | 524 |
515 PaintProperties paint_properties_; | 525 PaintProperties paint_properties_; |
516 | 526 |
517 DISALLOW_COPY_AND_ASSIGN(Layer); | 527 DISALLOW_COPY_AND_ASSIGN(Layer); |
518 }; | 528 }; |
519 | 529 |
520 } // namespace cc | 530 } // namespace cc |
521 | 531 |
522 #endif // CC_LAYERS_LAYER_H_ | 532 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |