| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "cc/animation/layer_animation_controller.h" | 13 #include "cc/animation/layer_animation_controller.h" |
| 14 #include "cc/animation/layer_animation_value_observer.h" | 14 #include "cc/animation/layer_animation_value_observer.h" |
| 15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
| 16 #include "cc/base/region.h" | 16 #include "cc/base/region.h" |
| 17 #include "cc/base/scoped_ptr_vector.h" | 17 #include "cc/base/scoped_ptr_vector.h" |
| 18 #include "cc/layers/compositing_reasons.h" | 18 #include "cc/layers/compositing_reasons.h" |
| 19 #include "cc/layers/draw_properties.h" | 19 #include "cc/layers/draw_properties.h" |
| 20 #include "cc/layers/layer_lists.h" | 20 #include "cc/layers/layer_lists.h" |
| 21 #include "cc/layers/layer_position_constraint.h" | 21 #include "cc/layers/layer_position_constraint.h" |
| 22 #include "cc/layers/paint_properties.h" | 22 #include "cc/layers/paint_properties.h" |
| 23 #include "cc/layers/render_surface.h" | 23 #include "cc/layers/render_surface.h" |
| 24 #include "cc/output/filter_operations.h" | 24 #include "cc/output/filter_operations.h" |
| 25 #include "cc/trees/occlusion_tracker.h" | 25 #include "cc/trees/occlusion_tracker.h" |
| 26 #include "skia/ext/refptr.h" | 26 #include "skia/ext/refptr.h" |
| 27 #include "third_party/skia/include/core/SkColor.h" | 27 #include "third_party/skia/include/core/SkColor.h" |
| 28 #include "third_party/skia/include/core/SkImageFilter.h" | 28 #include "third_party/skia/include/core/SkImageFilter.h" |
| 29 #include "third_party/skia/include/core/SkPicture.h" |
| 29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 30 #include "ui/gfx/rect_f.h" | 31 #include "ui/gfx/rect_f.h" |
| 31 #include "ui/gfx/transform.h" | 32 #include "ui/gfx/transform.h" |
| 32 | 33 |
| 33 namespace gfx { | 34 namespace gfx { |
| 34 class BoxF; | 35 class BoxF; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace cc { | 38 namespace cc { |
| 38 | 39 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 364 |
| 364 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 365 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 365 | 366 |
| 366 // In impl-side painting, this returns true if this layer type is not | 367 // In impl-side painting, this returns true if this layer type is not |
| 367 // compatible with the main thread running freely, such as a double-buffered | 368 // compatible with the main thread running freely, such as a double-buffered |
| 368 // canvas that doesn't want to be triple-buffered across all three trees. | 369 // canvas that doesn't want to be triple-buffered across all three trees. |
| 369 virtual bool BlocksPendingCommit() const; | 370 virtual bool BlocksPendingCommit() const; |
| 370 // Returns true if anything in this tree blocksPendingCommit. | 371 // Returns true if anything in this tree blocksPendingCommit. |
| 371 bool BlocksPendingCommitRecursive() const; | 372 bool BlocksPendingCommitRecursive() const; |
| 372 | 373 |
| 374 virtual skia::RefPtr<SkPicture> GetPicture() const; |
| 375 |
| 373 virtual bool CanClipSelf() const; | 376 virtual bool CanClipSelf() const; |
| 374 | 377 |
| 375 // Constructs a LayerImpl of the correct runtime type for this Layer type. | 378 // Constructs a LayerImpl of the correct runtime type for this Layer type. |
| 376 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 379 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 377 | 380 |
| 378 bool NeedsDisplayForTesting() const { return !update_rect_.IsEmpty(); } | 381 bool NeedsDisplayForTesting() const { return !update_rect_.IsEmpty(); } |
| 379 void ResetNeedsDisplayForTesting() { update_rect_ = gfx::RectF(); } | 382 void ResetNeedsDisplayForTesting() { update_rect_ = gfx::RectF(); } |
| 380 | 383 |
| 381 RenderingStatsInstrumentation* rendering_stats_instrumentation() const; | 384 RenderingStatsInstrumentation* rendering_stats_instrumentation() const; |
| 382 | 385 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 DrawProperties<Layer, RenderSurface> draw_properties_; | 538 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 536 | 539 |
| 537 PaintProperties paint_properties_; | 540 PaintProperties paint_properties_; |
| 538 | 541 |
| 539 DISALLOW_COPY_AND_ASSIGN(Layer); | 542 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 540 }; | 543 }; |
| 541 | 544 |
| 542 } // namespace cc | 545 } // namespace cc |
| 543 | 546 |
| 544 #endif // CC_LAYERS_LAYER_H_ | 547 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |