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 void SetDebugName(const std::string& debug_name); |
enne (OOO)
2013/08/02 17:58:17
Can you remove SetDebugName?
qiankun
2013/08/05 06:54:15
Done.
| |
297 virtual std::string DebugName(); | |
298 | |
299 void SetLayerClient(LayerClient* client) { client_ = client; } | |
300 | |
296 void SetCompositingReasons(CompositingReasons reasons); | 301 void SetCompositingReasons(CompositingReasons reasons); |
297 | 302 |
298 virtual void PushPropertiesTo(LayerImpl* layer); | 303 virtual void PushPropertiesTo(LayerImpl* layer); |
299 | 304 |
300 void CreateRenderSurface(); | 305 void CreateRenderSurface(); |
301 void ClearRenderSurface(); | 306 void ClearRenderSurface(); |
302 | 307 |
303 // The contents scale converts from logical, non-page-scaled pixels to target | 308 // 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 | 309 // 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 | 310 // 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 | 512 |
508 gfx::Transform transform_; | 513 gfx::Transform transform_; |
509 gfx::Transform sublayer_transform_; | 514 gfx::Transform sublayer_transform_; |
510 | 515 |
511 // Replica layer used for reflections. | 516 // Replica layer used for reflections. |
512 scoped_refptr<Layer> replica_layer_; | 517 scoped_refptr<Layer> replica_layer_; |
513 | 518 |
514 // Transient properties. | 519 // Transient properties. |
515 float raster_scale_; | 520 float raster_scale_; |
516 | 521 |
522 LayerClient* client_; | |
523 | |
517 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 524 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
518 | 525 |
519 base::Closure did_scroll_callback_; | 526 base::Closure did_scroll_callback_; |
520 | 527 |
521 DrawProperties<Layer, RenderSurface> draw_properties_; | 528 DrawProperties<Layer, RenderSurface> draw_properties_; |
522 | 529 |
523 PaintProperties paint_properties_; | 530 PaintProperties paint_properties_; |
524 | 531 |
525 DISALLOW_COPY_AND_ASSIGN(Layer); | 532 DISALLOW_COPY_AND_ASSIGN(Layer); |
526 }; | 533 }; |
527 | 534 |
528 } // namespace cc | 535 } // namespace cc |
529 | 536 |
530 #endif // CC_LAYERS_LAYER_H_ | 537 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |