| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "cc/input/input_handler.h" | 23 #include "cc/input/input_handler.h" |
| 24 #include "cc/layers/layer_collections.h" | 24 #include "cc/layers/layer_collections.h" |
| 25 #include "cc/layers/layer_position_constraint.h" | 25 #include "cc/layers/layer_position_constraint.h" |
| 26 #include "cc/layers/paint_properties.h" | 26 #include "cc/layers/paint_properties.h" |
| 27 #include "cc/output/filter_operations.h" | 27 #include "cc/output/filter_operations.h" |
| 28 #include "cc/trees/element_id.h" | 28 #include "cc/trees/element_id.h" |
| 29 #include "cc/trees/layer_tree.h" | 29 #include "cc/trees/layer_tree.h" |
| 30 #include "cc/trees/mutator_host_client.h" | 30 #include "cc/trees/mutator_host_client.h" |
| 31 #include "cc/trees/property_tree.h" | 31 #include "cc/trees/property_tree.h" |
| 32 #include "cc/trees/target_property.h" | 32 #include "cc/trees/target_property.h" |
| 33 #include "skia/ext/cdl_picture.h" |
| 33 #include "third_party/skia/include/core/SkColor.h" | 34 #include "third_party/skia/include/core/SkColor.h" |
| 34 #include "third_party/skia/include/core/SkPicture.h" | |
| 35 #include "ui/gfx/geometry/point3_f.h" | 35 #include "ui/gfx/geometry/point3_f.h" |
| 36 #include "ui/gfx/geometry/rect.h" | 36 #include "ui/gfx/geometry/rect.h" |
| 37 #include "ui/gfx/geometry/rect_f.h" | 37 #include "ui/gfx/geometry/rect_f.h" |
| 38 #include "ui/gfx/geometry/scroll_offset.h" | 38 #include "ui/gfx/geometry/scroll_offset.h" |
| 39 #include "ui/gfx/transform.h" | 39 #include "ui/gfx/transform.h" |
| 40 | 40 |
| 41 namespace base { | 41 namespace base { |
| 42 namespace trace_event { | 42 namespace trace_event { |
| 43 class ConvertableToTraceFormat; | 43 class ConvertableToTraceFormat; |
| 44 } | 44 } |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // a LayerImpl, it pushes the properties to proto::LayerProperties. It is | 351 // a LayerImpl, it pushes the properties to proto::LayerProperties. It is |
| 352 // called only on layers that have changed properties. The properties | 352 // called only on layers that have changed properties. The properties |
| 353 // themselves are pushed to proto::LayerProperties. | 353 // themselves are pushed to proto::LayerProperties. |
| 354 virtual void ToLayerPropertiesProto(proto::LayerProperties* proto); | 354 virtual void ToLayerPropertiesProto(proto::LayerProperties* proto); |
| 355 | 355 |
| 356 LayerTreeHost* GetLayerTreeHostForTesting() const { return layer_tree_host_; } | 356 LayerTreeHost* GetLayerTreeHostForTesting() const { return layer_tree_host_; } |
| 357 LayerTree* GetLayerTree() const; | 357 LayerTree* GetLayerTree() const; |
| 358 | 358 |
| 359 virtual ScrollbarLayerInterface* ToScrollbarLayer(); | 359 virtual ScrollbarLayerInterface* ToScrollbarLayer(); |
| 360 | 360 |
| 361 virtual sk_sp<SkPicture> GetPicture() const; | 361 virtual sk_sp<CdlPicture> GetPicture() const; |
| 362 | 362 |
| 363 // Constructs a LayerImpl of the correct runtime type for this Layer type. | 363 // Constructs a LayerImpl of the correct runtime type for this Layer type. |
| 364 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 364 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 365 | 365 |
| 366 bool NeedsDisplayForTesting() const { return !inputs_.update_rect.IsEmpty(); } | 366 bool NeedsDisplayForTesting() const { return !inputs_.update_rect.IsEmpty(); } |
| 367 void ResetNeedsDisplayForTesting() { inputs_.update_rect = gfx::Rect(); } | 367 void ResetNeedsDisplayForTesting() { inputs_.update_rect = gfx::Rect(); } |
| 368 | 368 |
| 369 const PaintProperties& paint_properties() const { | 369 const PaintProperties& paint_properties() const { |
| 370 return paint_properties_; | 370 return paint_properties_; |
| 371 } | 371 } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 // These all act like draw properties, so don't need push properties. | 691 // These all act like draw properties, so don't need push properties. |
| 692 gfx::Rect visible_layer_rect_; | 692 gfx::Rect visible_layer_rect_; |
| 693 size_t num_unclipped_descendants_; | 693 size_t num_unclipped_descendants_; |
| 694 | 694 |
| 695 DISALLOW_COPY_AND_ASSIGN(Layer); | 695 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 696 }; | 696 }; |
| 697 | 697 |
| 698 } // namespace cc | 698 } // namespace cc |
| 699 | 699 |
| 700 #endif // CC_LAYERS_LAYER_H_ | 700 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |