| 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 #include <vector> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "ui/gfx/geometry/rect.h" | 39 #include "ui/gfx/geometry/rect.h" |
| 40 #include "ui/gfx/geometry/rect_f.h" | 40 #include "ui/gfx/geometry/rect_f.h" |
| 41 #include "ui/gfx/geometry/scroll_offset.h" | 41 #include "ui/gfx/geometry/scroll_offset.h" |
| 42 #include "ui/gfx/transform.h" | 42 #include "ui/gfx/transform.h" |
| 43 | 43 |
| 44 namespace base { | 44 namespace base { |
| 45 namespace trace_event { | 45 namespace trace_event { |
| 46 class ConvertableToTraceFormat; | 46 class ConvertableToTraceFormat; |
| 47 class TracedValue; | 47 class TracedValue; |
| 48 } | 48 } |
| 49 | 49 class DictionaryValue; |
| 50 // TODO(ssid): remove these aliases after the tracing clients are moved to the | |
| 51 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 | |
| 52 namespace debug { | |
| 53 using ::base::trace_event::ConvertableToTraceFormat; | |
| 54 using ::base::trace_event::TracedValue; | |
| 55 } | 50 } |
| 56 class DictionaryValue; | |
| 57 } // namespace base | |
| 58 | 51 |
| 59 namespace cc { | 52 namespace cc { |
| 60 | 53 |
| 61 class LayerTreeHostImpl; | 54 class LayerTreeHostImpl; |
| 62 class LayerTreeImpl; | 55 class LayerTreeImpl; |
| 63 class MicroBenchmarkImpl; | 56 class MicroBenchmarkImpl; |
| 64 class Occlusion; | 57 class Occlusion; |
| 65 template <typename LayerType> | 58 template <typename LayerType> |
| 66 class OcclusionTracker; | 59 class OcclusionTracker; |
| 67 class RenderPass; | 60 class RenderPass; |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 560 } |
| 568 | 561 |
| 569 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 562 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
| 570 | 563 |
| 571 virtual skia::RefPtr<SkPicture> GetPicture(); | 564 virtual skia::RefPtr<SkPicture> GetPicture(); |
| 572 | 565 |
| 573 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 566 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 574 virtual void PushPropertiesTo(LayerImpl* layer); | 567 virtual void PushPropertiesTo(LayerImpl* layer); |
| 575 | 568 |
| 576 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; | 569 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; |
| 577 virtual void AsValueInto(base::debug::TracedValue* dict) const; | 570 virtual void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 578 | 571 |
| 579 virtual size_t GPUMemoryUsageInBytes() const; | 572 virtual size_t GPUMemoryUsageInBytes() const; |
| 580 | 573 |
| 581 void SetNeedsPushProperties(); | 574 void SetNeedsPushProperties(); |
| 582 void AddDependentNeedsPushProperties(); | 575 void AddDependentNeedsPushProperties(); |
| 583 void RemoveDependentNeedsPushProperties(); | 576 void RemoveDependentNeedsPushProperties(); |
| 584 bool parent_should_know_need_push_properties() const { | 577 bool parent_should_know_need_push_properties() const { |
| 585 return needs_push_properties() || descendant_needs_push_properties(); | 578 return needs_push_properties() || descendant_needs_push_properties(); |
| 586 } | 579 } |
| 587 | 580 |
| 588 bool needs_push_properties() const { return needs_push_properties_; } | 581 bool needs_push_properties() const { return needs_push_properties_; } |
| 589 bool descendant_needs_push_properties() const { | 582 bool descendant_needs_push_properties() const { |
| 590 return num_dependents_need_push_properties_ > 0; | 583 return num_dependents_need_push_properties_ > 0; |
| 591 } | 584 } |
| 592 | 585 |
| 593 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); | 586 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); |
| 594 | 587 |
| 595 virtual void SetDebugInfo( | 588 virtual void SetDebugInfo( |
| 596 scoped_refptr<base::debug::ConvertableToTraceFormat> other); | 589 scoped_refptr<base::trace_event::ConvertableToTraceFormat> other); |
| 597 | 590 |
| 598 bool IsDrawnRenderSurfaceLayerListMember() const; | 591 bool IsDrawnRenderSurfaceLayerListMember() const; |
| 599 | 592 |
| 600 void Set3dSortingContextId(int id); | 593 void Set3dSortingContextId(int id); |
| 601 int sorting_context_id() { return sorting_context_id_; } | 594 int sorting_context_id() { return sorting_context_id_; } |
| 602 | 595 |
| 603 void PassFrameTimingRequests( | 596 void PassFrameTimingRequests( |
| 604 std::vector<FrameTimingRequest>* frame_timing_requests); | 597 std::vector<FrameTimingRequest>* frame_timing_requests); |
| 605 const std::vector<FrameTimingRequest>& frame_timing_requests() const { | 598 const std::vector<FrameTimingRequest>& frame_timing_requests() const { |
| 606 return frame_timing_requests_; | 599 return frame_timing_requests_; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 755 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
| 763 | 756 |
| 764 scoped_ptr<ScrollbarSet> scrollbars_; | 757 scoped_ptr<ScrollbarSet> scrollbars_; |
| 765 | 758 |
| 766 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 759 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
| 767 | 760 |
| 768 // Group of properties that need to be computed based on the layer tree | 761 // Group of properties that need to be computed based on the layer tree |
| 769 // hierarchy before layers can be drawn. | 762 // hierarchy before layers can be drawn. |
| 770 DrawProperties<LayerImpl> draw_properties_; | 763 DrawProperties<LayerImpl> draw_properties_; |
| 771 | 764 |
| 772 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 765 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info_; |
| 773 scoped_ptr<RenderSurfaceImpl> render_surface_; | 766 scoped_ptr<RenderSurfaceImpl> render_surface_; |
| 774 | 767 |
| 775 std::vector<FrameTimingRequest> frame_timing_requests_; | 768 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 776 bool frame_timing_requests_dirty_; | 769 bool frame_timing_requests_dirty_; |
| 777 | 770 |
| 778 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 771 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 779 }; | 772 }; |
| 780 | 773 |
| 781 } // namespace cc | 774 } // namespace cc |
| 782 | 775 |
| 783 #endif // CC_LAYERS_LAYER_IMPL_H_ | 776 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |