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_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <unordered_map> | 14 #include <unordered_map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
21 #include "cc/base/synced_property.h" | 21 #include "cc/base/synced_property.h" |
22 #include "cc/debug/micro_benchmark_controller_impl.h" | 22 #include "cc/debug/micro_benchmark_controller_impl.h" |
23 #include "cc/input/browser_controls_offset_manager_client.h" | 23 #include "cc/input/browser_controls_offset_manager_client.h" |
24 #include "cc/input/input_handler.h" | 24 #include "cc/input/input_handler.h" |
25 #include "cc/input/scrollbar_animation_controller.h" | 25 #include "cc/input/scrollbar_animation_controller.h" |
26 #include "cc/layers/layer_collections.h" | 26 #include "cc/layers/layer_collections.h" |
27 #include "cc/layers/render_pass_sink.h" | |
28 #include "cc/output/begin_frame_args.h" | 27 #include "cc/output/begin_frame_args.h" |
29 #include "cc/output/compositor_frame_sink_client.h" | 28 #include "cc/output/compositor_frame_sink_client.h" |
30 #include "cc/output/context_cache_controller.h" | 29 #include "cc/output/context_cache_controller.h" |
31 #include "cc/output/managed_memory_policy.h" | 30 #include "cc/output/managed_memory_policy.h" |
32 #include "cc/quads/render_pass.h" | 31 #include "cc/quads/render_pass.h" |
33 #include "cc/resources/resource_provider.h" | 32 #include "cc/resources/resource_provider.h" |
34 #include "cc/resources/ui_resource_client.h" | 33 #include "cc/resources/ui_resource_client.h" |
35 #include "cc/scheduler/begin_frame_tracker.h" | 34 #include "cc/scheduler/begin_frame_tracker.h" |
36 #include "cc/scheduler/commit_earlyout_reason.h" | 35 #include "cc/scheduler/commit_earlyout_reason.h" |
37 #include "cc/scheduler/draw_result.h" | 36 #include "cc/scheduler/draw_result.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 float CurrentBrowserControlsShownRatio() const override; | 208 float CurrentBrowserControlsShownRatio() const override; |
210 void DidChangeBrowserControlsPosition() override; | 209 void DidChangeBrowserControlsPosition() override; |
211 bool HaveRootScrollLayer() const override; | 210 bool HaveRootScrollLayer() const override; |
212 | 211 |
213 void UpdateViewportContainerSizes(); | 212 void UpdateViewportContainerSizes(); |
214 | 213 |
215 void set_resourceless_software_draw_for_testing() { | 214 void set_resourceless_software_draw_for_testing() { |
216 resourceless_software_draw_ = true; | 215 resourceless_software_draw_ = true; |
217 } | 216 } |
218 | 217 |
219 struct CC_EXPORT FrameData : public RenderPassSink { | 218 struct CC_EXPORT FrameData { |
220 FrameData(); | 219 FrameData(); |
221 ~FrameData() override; | 220 ~FrameData(); |
222 void AsValueInto(base::trace_event::TracedValue* value) const; | 221 void AsValueInto(base::trace_event::TracedValue* value) const; |
223 | 222 |
224 std::vector<gfx::Rect> occluding_screen_space_rects; | 223 std::vector<gfx::Rect> occluding_screen_space_rects; |
225 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 224 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
226 RenderPassList render_passes; | 225 RenderPassList render_passes; |
227 const LayerImplList* render_surface_layer_list; | 226 const LayerImplList* render_surface_layer_list; |
228 LayerImplList will_draw_layers; | 227 LayerImplList will_draw_layers; |
229 bool has_no_damage; | 228 bool has_no_damage; |
230 bool may_contain_video; | 229 bool may_contain_video; |
231 BeginFrameAck begin_frame_ack; | 230 BeginFrameAck begin_frame_ack; |
232 | 231 |
233 // RenderPassSink implementation. | |
234 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; | |
235 | |
236 private: | 232 private: |
237 DISALLOW_COPY_AND_ASSIGN(FrameData); | 233 DISALLOW_COPY_AND_ASSIGN(FrameData); |
238 }; | 234 }; |
239 | 235 |
240 virtual void DidSendBeginMainFrame() {} | 236 virtual void DidSendBeginMainFrame() {} |
241 virtual void BeginMainFrameAborted( | 237 virtual void BeginMainFrameAborted( |
242 CommitEarlyOutReason reason, | 238 CommitEarlyOutReason reason, |
243 std::vector<std::unique_ptr<SwapPromise>> swap_promises); | 239 std::vector<std::unique_ptr<SwapPromise>> swap_promises); |
244 virtual void ReadyToCommit() {} // For tests. | 240 virtual void ReadyToCommit() {} // For tests. |
245 virtual void BeginCommit(); | 241 virtual void BeginCommit(); |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 // These callbacks are stored here to be transfered to the main thread when we | 852 // These callbacks are stored here to be transfered to the main thread when we |
857 // begin main frame. These callbacks must only be called on the main thread. | 853 // begin main frame. These callbacks must only be called on the main thread. |
858 std::vector<base::Closure> completed_image_decode_callbacks_; | 854 std::vector<base::Closure> completed_image_decode_callbacks_; |
859 | 855 |
860 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 856 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
861 }; | 857 }; |
862 | 858 |
863 } // namespace cc | 859 } // namespace cc |
864 | 860 |
865 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 861 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |