| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> |
| 8 #include <set> | 9 #include <set> |
| 9 #include <string> | 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/values.h" | 15 #include "base/values.h" |
| 15 #include "cc/animation/animation_delegate.h" | 16 #include "cc/animation/animation_delegate.h" |
| 16 #include "cc/animation/layer_animation_controller.h" | 17 #include "cc/animation/layer_animation_controller.h" |
| 17 #include "cc/animation/layer_animation_value_observer.h" | 18 #include "cc/animation/layer_animation_value_observer.h" |
| 18 #include "cc/animation/layer_animation_value_provider.h" | 19 #include "cc/animation/layer_animation_value_provider.h" |
| 19 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
| 20 #include "cc/base/region.h" | 21 #include "cc/base/region.h" |
| 21 #include "cc/base/scoped_ptr_vector.h" | 22 #include "cc/base/scoped_ptr_vector.h" |
| 22 #include "cc/base/synced_property.h" | 23 #include "cc/base/synced_property.h" |
| 23 #include "cc/debug/frame_timing_request.h" | 24 #include "cc/debug/frame_timing_request.h" |
| 24 #include "cc/input/input_handler.h" | 25 #include "cc/input/input_handler.h" |
| 25 #include "cc/input/scrollbar.h" | 26 #include "cc/input/scrollbar.h" |
| 26 #include "cc/layers/draw_properties.h" | 27 #include "cc/layers/draw_properties.h" |
| 27 #include "cc/layers/layer_lists.h" | 28 #include "cc/layers/layer_lists.h" |
| 28 #include "cc/layers/layer_position_constraint.h" | 29 #include "cc/layers/layer_position_constraint.h" |
| 29 #include "cc/layers/render_surface_impl.h" | 30 #include "cc/layers/render_surface_impl.h" |
| 30 #include "cc/layers/scroll_blocks_on.h" | 31 #include "cc/layers/scroll_blocks_on.h" |
| 31 #include "cc/output/filter_operations.h" | 32 #include "cc/output/filter_operations.h" |
| 32 #include "cc/quads/shared_quad_state.h" | 33 #include "cc/quads/shared_quad_state.h" |
| 33 #include "cc/resources/resource_provider.h" | 34 #include "cc/resources/resource_provider.h" |
| 35 #include "cc/resources/tile_priority.h" |
| 34 #include "skia/ext/refptr.h" | 36 #include "skia/ext/refptr.h" |
| 35 #include "third_party/skia/include/core/SkColor.h" | 37 #include "third_party/skia/include/core/SkColor.h" |
| 36 #include "third_party/skia/include/core/SkImageFilter.h" | 38 #include "third_party/skia/include/core/SkImageFilter.h" |
| 37 #include "third_party/skia/include/core/SkPicture.h" | 39 #include "third_party/skia/include/core/SkPicture.h" |
| 38 #include "ui/gfx/geometry/point3_f.h" | 40 #include "ui/gfx/geometry/point3_f.h" |
| 39 #include "ui/gfx/geometry/rect.h" | 41 #include "ui/gfx/geometry/rect.h" |
| 40 #include "ui/gfx/geometry/rect_f.h" | 42 #include "ui/gfx/geometry/rect_f.h" |
| 41 #include "ui/gfx/geometry/scroll_offset.h" | 43 #include "ui/gfx/geometry/scroll_offset.h" |
| 42 #include "ui/gfx/transform.h" | 44 #include "ui/gfx/transform.h" |
| 43 | 45 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; | 556 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; |
| 555 } | 557 } |
| 556 | 558 |
| 557 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 559 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 558 | 560 |
| 559 virtual skia::RefPtr<SkPicture> GetPicture(); | 561 virtual skia::RefPtr<SkPicture> GetPicture(); |
| 560 | 562 |
| 561 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 563 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 562 virtual void PushPropertiesTo(LayerImpl* layer); | 564 virtual void PushPropertiesTo(LayerImpl* layer); |
| 563 | 565 |
| 564 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; | 566 virtual void GetAllTilesAndPrioritiesForTracing( |
| 567 std::map<const Tile*, TilePriority>* tile_map) const; |
| 565 virtual void AsValueInto(base::trace_event::TracedValue* dict) const; | 568 virtual void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 566 | 569 |
| 567 virtual size_t GPUMemoryUsageInBytes() const; | 570 virtual size_t GPUMemoryUsageInBytes() const; |
| 568 | 571 |
| 569 void SetNeedsPushProperties(); | 572 void SetNeedsPushProperties(); |
| 570 void AddDependentNeedsPushProperties(); | 573 void AddDependentNeedsPushProperties(); |
| 571 void RemoveDependentNeedsPushProperties(); | 574 void RemoveDependentNeedsPushProperties(); |
| 572 bool parent_should_know_need_push_properties() const { | 575 bool parent_should_know_need_push_properties() const { |
| 573 return needs_push_properties() || descendant_needs_push_properties(); | 576 return needs_push_properties() || descendant_needs_push_properties(); |
| 574 } | 577 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 | 773 |
| 771 std::vector<FrameTimingRequest> frame_timing_requests_; | 774 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 772 bool frame_timing_requests_dirty_; | 775 bool frame_timing_requests_dirty_; |
| 773 | 776 |
| 774 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 777 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 775 }; | 778 }; |
| 776 | 779 |
| 777 } // namespace cc | 780 } // namespace cc |
| 778 | 781 |
| 779 #endif // CC_LAYERS_LAYER_IMPL_H_ | 782 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |