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