| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/logging.h" | 12 #include "base/logging.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/values.h" | 14 #include "base/values.h" |
| 14 #include "cc/animation/animation_delegate.h" | 15 #include "cc/animation/animation_delegate.h" |
| 15 #include "cc/animation/layer_animation_controller.h" | 16 #include "cc/animation/layer_animation_controller.h" |
| 16 #include "cc/animation/layer_animation_value_observer.h" | 17 #include "cc/animation/layer_animation_value_observer.h" |
| 17 #include "cc/animation/layer_animation_value_provider.h" | 18 #include "cc/animation/layer_animation_value_provider.h" |
| 18 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
| 19 #include "cc/base/region.h" | 20 #include "cc/base/region.h" |
| 20 #include "cc/base/scoped_ptr_vector.h" | 21 #include "cc/base/scoped_ptr_vector.h" |
| 22 #include "cc/debug/frame_timing_request.h" |
| 21 #include "cc/input/input_handler.h" | 23 #include "cc/input/input_handler.h" |
| 22 #include "cc/input/scrollbar.h" | 24 #include "cc/input/scrollbar.h" |
| 23 #include "cc/layers/draw_properties.h" | 25 #include "cc/layers/draw_properties.h" |
| 24 #include "cc/layers/layer_lists.h" | 26 #include "cc/layers/layer_lists.h" |
| 25 #include "cc/layers/layer_position_constraint.h" | 27 #include "cc/layers/layer_position_constraint.h" |
| 26 #include "cc/layers/render_surface_impl.h" | 28 #include "cc/layers/render_surface_impl.h" |
| 27 #include "cc/output/filter_operations.h" | 29 #include "cc/output/filter_operations.h" |
| 28 #include "cc/quads/shared_quad_state.h" | 30 #include "cc/quads/shared_quad_state.h" |
| 29 #include "cc/resources/resource_provider.h" | 31 #include "cc/resources/resource_provider.h" |
| 30 #include "skia/ext/refptr.h" | 32 #include "skia/ext/refptr.h" |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); | 561 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); |
| 560 | 562 |
| 561 virtual void SetDebugInfo( | 563 virtual void SetDebugInfo( |
| 562 scoped_refptr<base::debug::ConvertableToTraceFormat> other); | 564 scoped_refptr<base::debug::ConvertableToTraceFormat> other); |
| 563 | 565 |
| 564 bool IsDrawnRenderSurfaceLayerListMember() const; | 566 bool IsDrawnRenderSurfaceLayerListMember() const; |
| 565 | 567 |
| 566 void Set3dSortingContextId(int id); | 568 void Set3dSortingContextId(int id); |
| 567 int sorting_context_id() { return sorting_context_id_; } | 569 int sorting_context_id() { return sorting_context_id_; } |
| 568 | 570 |
| 571 void PassFrameTimingRequests( |
| 572 std::vector<FrameTimingRequest>* frame_timing_requests); |
| 573 const std::vector<FrameTimingRequest>& frame_timing_requests() const { |
| 574 return frame_timing_requests_; |
| 575 } |
| 576 |
| 569 protected: | 577 protected: |
| 570 LayerImpl(LayerTreeImpl* layer_impl, int id); | 578 LayerImpl(LayerTreeImpl* layer_impl, int id); |
| 571 | 579 |
| 572 // Get the color and size of the layer's debug border. | 580 // Get the color and size of the layer's debug border. |
| 573 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; | 581 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; |
| 574 | 582 |
| 575 void AppendDebugBorderQuad(RenderPass* render_pass, | 583 void AppendDebugBorderQuad(RenderPass* render_pass, |
| 576 const gfx::Size& content_bounds, | 584 const gfx::Size& content_bounds, |
| 577 const SharedQuadState* shared_quad_state, | 585 const SharedQuadState* shared_quad_state, |
| 578 AppendQuadsData* append_quads_data) const; | 586 AppendQuadsData* append_quads_data) const; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 scoped_ptr<ScrollbarSet> scrollbars_; | 721 scoped_ptr<ScrollbarSet> scrollbars_; |
| 714 | 722 |
| 715 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 723 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
| 716 | 724 |
| 717 // Group of properties that need to be computed based on the layer tree | 725 // Group of properties that need to be computed based on the layer tree |
| 718 // hierarchy before layers can be drawn. | 726 // hierarchy before layers can be drawn. |
| 719 DrawProperties<LayerImpl> draw_properties_; | 727 DrawProperties<LayerImpl> draw_properties_; |
| 720 | 728 |
| 721 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 729 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 722 scoped_ptr<RenderSurfaceImpl> render_surface_; | 730 scoped_ptr<RenderSurfaceImpl> render_surface_; |
| 731 |
| 732 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 733 bool frame_timing_requests_dirty_; |
| 734 |
| 723 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 735 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 724 }; | 736 }; |
| 725 | 737 |
| 726 } // namespace cc | 738 } // namespace cc |
| 727 | 739 |
| 728 #endif // CC_LAYERS_LAYER_IMPL_H_ | 740 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |