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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "cc/animation/layer_animation_controller.h" | 14 #include "cc/animation/layer_animation_controller.h" |
15 #include "cc/animation/layer_animation_value_observer.h" | 15 #include "cc/animation/layer_animation_value_observer.h" |
16 #include "cc/animation/layer_animation_value_provider.h" | 16 #include "cc/animation/layer_animation_value_provider.h" |
17 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
18 #include "cc/base/region.h" | 18 #include "cc/base/region.h" |
19 #include "cc/base/scoped_ptr_vector.h" | 19 #include "cc/base/scoped_ptr_vector.h" |
20 #include "cc/debug/micro_benchmark.h" | 20 #include "cc/debug/micro_benchmark.h" |
21 #include "cc/layers/draw_properties.h" | 21 #include "cc/layers/draw_properties.h" |
| 22 #include "cc/layers/layer_client.h" |
22 #include "cc/layers/layer_lists.h" | 23 #include "cc/layers/layer_lists.h" |
23 #include "cc/layers/layer_position_constraint.h" | 24 #include "cc/layers/layer_position_constraint.h" |
24 #include "cc/layers/paint_properties.h" | 25 #include "cc/layers/paint_properties.h" |
25 #include "cc/layers/render_surface.h" | 26 #include "cc/layers/render_surface.h" |
26 #include "cc/output/filter_operations.h" | 27 #include "cc/output/filter_operations.h" |
27 #include "skia/ext/refptr.h" | 28 #include "skia/ext/refptr.h" |
28 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
29 #include "third_party/skia/include/core/SkImageFilter.h" | 30 #include "third_party/skia/include/core/SkImageFilter.h" |
30 #include "third_party/skia/include/core/SkPicture.h" | 31 #include "third_party/skia/include/core/SkPicture.h" |
31 #include "third_party/skia/include/core/SkXfermode.h" | 32 #include "third_party/skia/include/core/SkXfermode.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 virtual void SavePaintProperties(); | 362 virtual void SavePaintProperties(); |
362 // Returns true iff any resources were updated that need to be committed. | 363 // Returns true iff any resources were updated that need to be committed. |
363 virtual bool Update(ResourceUpdateQueue* queue, | 364 virtual bool Update(ResourceUpdateQueue* queue, |
364 const OcclusionTracker<Layer>* occlusion); | 365 const OcclusionTracker<Layer>* occlusion); |
365 virtual bool NeedMoreUpdates(); | 366 virtual bool NeedMoreUpdates(); |
366 virtual void SetIsMask(bool is_mask) {} | 367 virtual void SetIsMask(bool is_mask) {} |
367 virtual void ReduceMemoryUsage() {} | 368 virtual void ReduceMemoryUsage() {} |
368 virtual void OnOutputSurfaceCreated() {} | 369 virtual void OnOutputSurfaceCreated() {} |
369 virtual bool IsSuitableForGpuRasterization() const; | 370 virtual bool IsSuitableForGpuRasterization() const; |
370 | 371 |
371 virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo(); | 372 virtual scoped_refptr<LayerDebugInfo> TakeDebugInfo(); |
372 | 373 |
373 void SetLayerClient(LayerClient* client) { client_ = client; } | 374 void SetLayerClient(LayerClient* client) { client_ = client; } |
374 | 375 |
375 virtual void PushPropertiesTo(LayerImpl* layer); | 376 virtual void PushPropertiesTo(LayerImpl* layer); |
376 | 377 |
377 void CreateRenderSurface(); | 378 void CreateRenderSurface(); |
378 void ClearRenderSurface(); | 379 void ClearRenderSurface(); |
379 void ClearRenderSurfaceLayerList(); | 380 void ClearRenderSurfaceLayerList(); |
380 | 381 |
381 // The contents scale converts from logical, non-page-scaled pixels to target | 382 // The contents scale converts from logical, non-page-scaled pixels to target |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 DrawProperties<Layer> draw_properties_; | 642 DrawProperties<Layer> draw_properties_; |
642 | 643 |
643 PaintProperties paint_properties_; | 644 PaintProperties paint_properties_; |
644 | 645 |
645 DISALLOW_COPY_AND_ASSIGN(Layer); | 646 DISALLOW_COPY_AND_ASSIGN(Layer); |
646 }; | 647 }; |
647 | 648 |
648 } // namespace cc | 649 } // namespace cc |
649 | 650 |
650 #endif // CC_LAYERS_LAYER_H_ | 651 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |