| 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 20 matching lines...) Expand all Loading... |
| 31 #include "ui/gfx/transform.h" | 31 #include "ui/gfx/transform.h" |
| 32 | 32 |
| 33 namespace cc { | 33 namespace cc { |
| 34 | 34 |
| 35 class Animation; | 35 class Animation; |
| 36 class AnimationDelegate; | 36 class AnimationDelegate; |
| 37 struct AnimationEvent; | 37 struct AnimationEvent; |
| 38 class CopyOutputRequest; | 38 class CopyOutputRequest; |
| 39 class LayerAnimationDelegate; | 39 class LayerAnimationDelegate; |
| 40 class LayerAnimationEventObserver; | 40 class LayerAnimationEventObserver; |
| 41 class LayerClient; |
| 41 class LayerImpl; | 42 class LayerImpl; |
| 42 class LayerTreeHost; | 43 class LayerTreeHost; |
| 43 class LayerTreeImpl; | 44 class LayerTreeImpl; |
| 44 class PriorityCalculator; | 45 class PriorityCalculator; |
| 45 class RenderingStatsInstrumentation; | 46 class RenderingStatsInstrumentation; |
| 46 class ResourceUpdateQueue; | 47 class ResourceUpdateQueue; |
| 47 class ScrollbarLayer; | 48 class ScrollbarLayer; |
| 48 struct AnimationEvent; | 49 struct AnimationEvent; |
| 49 | 50 |
| 50 // Base class for composited layers. Special layer types are derived from | 51 // Base class for composited layers. Special layer types are derived from |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // These methods typically need to be overwritten by derived classes. | 286 // These methods typically need to be overwritten by derived classes. |
| 286 virtual bool DrawsContent() const; | 287 virtual bool DrawsContent() const; |
| 287 virtual void SavePaintProperties(); | 288 virtual void SavePaintProperties(); |
| 288 // Returns true iff any resources were updated that need to be committed. | 289 // Returns true iff any resources were updated that need to be committed. |
| 289 virtual bool Update(ResourceUpdateQueue* queue, | 290 virtual bool Update(ResourceUpdateQueue* queue, |
| 290 const OcclusionTracker* occlusion); | 291 const OcclusionTracker* occlusion); |
| 291 virtual bool NeedMoreUpdates(); | 292 virtual bool NeedMoreUpdates(); |
| 292 virtual void SetIsMask(bool is_mask) {} | 293 virtual void SetIsMask(bool is_mask) {} |
| 293 virtual void ReduceMemoryUsage() {} | 294 virtual void ReduceMemoryUsage() {} |
| 294 | 295 |
| 295 void SetDebugName(const std::string& debug_name); | 296 virtual std::string DebugName(); |
| 297 |
| 298 void SetLayerClient(LayerClient* client) { client_ = client; } |
| 299 |
| 296 void SetCompositingReasons(CompositingReasons reasons); | 300 void SetCompositingReasons(CompositingReasons reasons); |
| 297 | 301 |
| 298 virtual void PushPropertiesTo(LayerImpl* layer); | 302 virtual void PushPropertiesTo(LayerImpl* layer); |
| 299 | 303 |
| 300 void CreateRenderSurface(); | 304 void CreateRenderSurface(); |
| 301 void ClearRenderSurface(); | 305 void ClearRenderSurface(); |
| 302 | 306 |
| 303 // The contents scale converts from logical, non-page-scaled pixels to target | 307 // The contents scale converts from logical, non-page-scaled pixels to target |
| 304 // pixels. The contents scale is 1 for the root layer as it is already in | 308 // pixels. The contents scale is 1 for the root layer as it is already in |
| 305 // physical pixels. By default contents scale is forced to be 1 except for | 309 // physical pixels. By default contents scale is forced to be 1 except for |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 511 |
| 508 gfx::Transform transform_; | 512 gfx::Transform transform_; |
| 509 gfx::Transform sublayer_transform_; | 513 gfx::Transform sublayer_transform_; |
| 510 | 514 |
| 511 // Replica layer used for reflections. | 515 // Replica layer used for reflections. |
| 512 scoped_refptr<Layer> replica_layer_; | 516 scoped_refptr<Layer> replica_layer_; |
| 513 | 517 |
| 514 // Transient properties. | 518 // Transient properties. |
| 515 float raster_scale_; | 519 float raster_scale_; |
| 516 | 520 |
| 521 LayerClient* client_; |
| 522 |
| 517 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 523 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
| 518 | 524 |
| 519 base::Closure did_scroll_callback_; | 525 base::Closure did_scroll_callback_; |
| 520 | 526 |
| 521 DrawProperties<Layer, RenderSurface> draw_properties_; | 527 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 522 | 528 |
| 523 PaintProperties paint_properties_; | 529 PaintProperties paint_properties_; |
| 524 | 530 |
| 525 DISALLOW_COPY_AND_ASSIGN(Layer); | 531 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 526 }; | 532 }; |
| 527 | 533 |
| 528 } // namespace cc | 534 } // namespace cc |
| 529 | 535 |
| 530 #endif // CC_LAYERS_LAYER_H_ | 536 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |