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> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 ~FrameData() override; | 224 ~FrameData() override; |
225 void AsValueInto(base::trace_event::TracedValue* value) const; | 225 void AsValueInto(base::trace_event::TracedValue* value) const; |
226 | 226 |
227 std::vector<gfx::Rect> occluding_screen_space_rects; | 227 std::vector<gfx::Rect> occluding_screen_space_rects; |
228 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 228 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
229 RenderPassList render_passes; | 229 RenderPassList render_passes; |
230 const LayerImplList* render_surface_layer_list; | 230 const LayerImplList* render_surface_layer_list; |
231 LayerImplList will_draw_layers; | 231 LayerImplList will_draw_layers; |
232 bool has_no_damage; | 232 bool has_no_damage; |
233 bool may_contain_video; | 233 bool may_contain_video; |
| 234 bool handle_visibility_changed; |
234 | 235 |
235 // RenderPassSink implementation. | 236 // RenderPassSink implementation. |
236 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; | 237 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; |
237 | 238 |
238 private: | 239 private: |
239 DISALLOW_COPY_AND_ASSIGN(FrameData); | 240 DISALLOW_COPY_AND_ASSIGN(FrameData); |
240 }; | 241 }; |
241 | 242 |
242 virtual void BeginMainFrameAborted( | 243 virtual void BeginMainFrameAborted( |
243 CommitEarlyOutReason reason, | 244 CommitEarlyOutReason reason, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 void SetTreeActivationCallback(const base::Closure& callback) override; | 373 void SetTreeActivationCallback(const base::Closure& callback) override; |
373 void OnDraw(const gfx::Transform& transform, | 374 void OnDraw(const gfx::Transform& transform, |
374 const gfx::Rect& viewport, | 375 const gfx::Rect& viewport, |
375 bool resourceless_software_draw) override; | 376 bool resourceless_software_draw) override; |
376 | 377 |
377 // LayerTreeMutatorClient. | 378 // LayerTreeMutatorClient. |
378 void SetNeedsMutate() override; | 379 void SetNeedsMutate() override; |
379 | 380 |
380 // Called from LayerTreeImpl. | 381 // Called from LayerTreeImpl. |
381 void OnCanDrawStateChangedForTree(); | 382 void OnCanDrawStateChangedForTree(); |
| 383 void HandleVisibilityChanged() { handle_visibility_changed_ = true; } |
382 | 384 |
383 // Implementation. | 385 // Implementation. |
384 int id() const { return id_; } | 386 int id() const { return id_; } |
385 bool CanDraw() const; | 387 bool CanDraw() const; |
386 CompositorFrameSink* compositor_frame_sink() const { | 388 CompositorFrameSink* compositor_frame_sink() const { |
387 return compositor_frame_sink_; | 389 return compositor_frame_sink_; |
388 } | 390 } |
389 void ReleaseCompositorFrameSink(); | 391 void ReleaseCompositorFrameSink(); |
390 | 392 |
391 std::string LayerTreeAsJson() const; | 393 std::string LayerTreeAsJson() const; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 | 824 |
823 SharedBitmapManager* shared_bitmap_manager_; | 825 SharedBitmapManager* shared_bitmap_manager_; |
824 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 826 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
825 TaskGraphRunner* task_graph_runner_; | 827 TaskGraphRunner* task_graph_runner_; |
826 int id_; | 828 int id_; |
827 | 829 |
828 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 830 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
829 | 831 |
830 bool requires_high_res_to_draw_; | 832 bool requires_high_res_to_draw_; |
831 bool is_likely_to_require_a_draw_; | 833 bool is_likely_to_require_a_draw_; |
| 834 bool handle_visibility_changed_; |
832 | 835 |
833 // TODO(danakj): Delete the compositor frame sink and all resources when | 836 // TODO(danakj): Delete the compositor frame sink and all resources when |
834 // it's lost instead of having this bool. | 837 // it's lost instead of having this bool. |
835 bool has_valid_compositor_frame_sink_; | 838 bool has_valid_compositor_frame_sink_; |
836 | 839 |
837 std::unique_ptr<Viewport> viewport_; | 840 std::unique_ptr<Viewport> viewport_; |
838 | 841 |
839 std::unique_ptr<LayerTreeMutator> mutator_; | 842 std::unique_ptr<LayerTreeMutator> mutator_; |
840 | 843 |
841 std::unique_ptr<PendingTreeDurationHistogramTimer> | 844 std::unique_ptr<PendingTreeDurationHistogramTimer> |
842 pending_tree_duration_timer_; | 845 pending_tree_duration_timer_; |
843 | 846 |
844 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 847 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
845 }; | 848 }; |
846 | 849 |
847 } // namespace cc | 850 } // namespace cc |
848 | 851 |
849 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 852 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |