| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 381 |
| 382 virtual bool SupportsLCDText() const; | 382 virtual bool SupportsLCDText() const; |
| 383 | 383 |
| 384 protected: | 384 protected: |
| 385 friend class LayerImpl; | 385 friend class LayerImpl; |
| 386 friend class TreeSynchronizer; | 386 friend class TreeSynchronizer; |
| 387 virtual ~Layer(); | 387 virtual ~Layer(); |
| 388 | 388 |
| 389 Layer(); | 389 Layer(); |
| 390 | 390 |
| 391 // These SetNeeds functions are in order of severity of update: |
| 392 // |
| 393 // Called when this layer has been modified in some way, but isn't sure |
| 394 // that it needs a commit yet. It needs CalcDrawProperties and UpdateLayers |
| 395 // before it knows whether or not a commit is required. |
| 396 void SetNeedsUpdate(); |
| 397 // Called when a property has been modified in a way that the layer |
| 398 // knows immediately that a commit is required. This implies SetNeedsUpdate. |
| 391 void SetNeedsCommit(); | 399 void SetNeedsCommit(); |
| 400 // Called when there's been a change in layer structure. Implies both |
| 401 // SetNeedsUpdate and SetNeedsCommit. |
| 392 void SetNeedsFullTreeSync(); | 402 void SetNeedsFullTreeSync(); |
| 393 bool IsPropertyChangeAllowed() const; | 403 bool IsPropertyChangeAllowed() const; |
| 394 | 404 |
| 395 void reset_raster_scale_to_unknown() { raster_scale_ = 0.f; } | 405 void reset_raster_scale_to_unknown() { raster_scale_ = 0.f; } |
| 396 | 406 |
| 397 // This flag is set when layer need repainting/updating. | 407 // This flag is set when layer need repainting/updating. |
| 398 bool needs_display_; | 408 bool needs_display_; |
| 399 | 409 |
| 400 // Tracks whether this layer may have changed stacking order with its | 410 // Tracks whether this layer may have changed stacking order with its |
| 401 // siblings. | 411 // siblings. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 DrawProperties<Layer, RenderSurface> draw_properties_; | 502 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 493 | 503 |
| 494 PaintProperties paint_properties_; | 504 PaintProperties paint_properties_; |
| 495 | 505 |
| 496 DISALLOW_COPY_AND_ASSIGN(Layer); | 506 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 497 }; | 507 }; |
| 498 | 508 |
| 499 } // namespace cc | 509 } // namespace cc |
| 500 | 510 |
| 501 #endif // CC_LAYERS_LAYER_H_ | 511 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |