Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary scope Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 143 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
144 // state. 144 // state.
145 class CC_EXPORT LayerTreeHostImpl 145 class CC_EXPORT LayerTreeHostImpl
146 : public InputHandler, 146 : public InputHandler,
147 public RendererClient, 147 public RendererClient,
148 public TileManagerClient, 148 public TileManagerClient,
149 public OutputSurfaceClient, 149 public OutputSurfaceClient,
150 public TopControlsManagerClient, 150 public TopControlsManagerClient,
151 public ScrollbarAnimationControllerClient, 151 public ScrollbarAnimationControllerClient,
152 public VideoFrameControllerClient, 152 public VideoFrameControllerClient,
153 public LayerTreeMutatorClient,
153 public MutatorHostClient, 154 public MutatorHostClient,
154 public base::SupportsWeakPtr<LayerTreeHostImpl> { 155 public base::SupportsWeakPtr<LayerTreeHostImpl> {
155 public: 156 public:
156 static std::unique_ptr<LayerTreeHostImpl> Create( 157 static std::unique_ptr<LayerTreeHostImpl> Create(
157 const LayerTreeSettings& settings, 158 const LayerTreeSettings& settings,
158 LayerTreeHostImplClient* client, 159 LayerTreeHostImplClient* client,
159 TaskRunnerProvider* task_runner_provider, 160 TaskRunnerProvider* task_runner_provider,
160 RenderingStatsInstrumentation* rendering_stats_instrumentation, 161 RenderingStatsInstrumentation* rendering_stats_instrumentation,
161 SharedBitmapManager* shared_bitmap_manager, 162 SharedBitmapManager* shared_bitmap_manager,
162 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 163 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override; 233 void AppendRenderPass(std::unique_ptr<RenderPass> render_pass) override;
233 234
234 private: 235 private:
235 DISALLOW_COPY_AND_ASSIGN(FrameData); 236 DISALLOW_COPY_AND_ASSIGN(FrameData);
236 }; 237 };
237 238
238 virtual void BeginMainFrameAborted(CommitEarlyOutReason reason); 239 virtual void BeginMainFrameAborted(CommitEarlyOutReason reason);
239 virtual void BeginCommit(); 240 virtual void BeginCommit();
240 virtual void CommitComplete(); 241 virtual void CommitComplete();
241 virtual void UpdateAnimationState(bool start_ready_animations); 242 virtual void UpdateAnimationState(bool start_ready_animations);
243 bool Mutate(base::TimeTicks monotonic_time);
242 void ActivateAnimations(); 244 void ActivateAnimations();
243 void Animate(); 245 void Animate();
244 void AnimatePendingTreeAfterCommit(); 246 void AnimatePendingTreeAfterCommit();
245 void MainThreadHasStoppedFlinging(); 247 void MainThreadHasStoppedFlinging();
246 void DidAnimateScrollOffset(); 248 void DidAnimateScrollOffset();
247 void SetViewportDamage(const gfx::Rect& damage_rect); 249 void SetViewportDamage(const gfx::Rect& damage_rect);
248 250
249 void SetTreeLayerFilterMutated(int layer_id, 251 void SetTreeLayerFilterMutated(int layer_id,
250 LayerTreeImpl* tree, 252 LayerTreeImpl* tree,
251 const FilterOperations& filters); 253 const FilterOperations& filters);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void DidSwapBuffers() override; 366 void DidSwapBuffers() override;
365 void DidSwapBuffersComplete() override; 367 void DidSwapBuffersComplete() override;
366 void ReclaimResources(const CompositorFrameAck* ack) override; 368 void ReclaimResources(const CompositorFrameAck* ack) override;
367 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 369 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
368 void SetTreeActivationCallback(const base::Closure& callback) override; 370 void SetTreeActivationCallback(const base::Closure& callback) override;
369 void OnDraw(const gfx::Transform& transform, 371 void OnDraw(const gfx::Transform& transform,
370 const gfx::Rect& viewport, 372 const gfx::Rect& viewport,
371 const gfx::Rect& clip, 373 const gfx::Rect& clip,
372 bool resourceless_software_draw) override; 374 bool resourceless_software_draw) override;
373 375
376 // LayerTreeMutatorClient.
377 void SetNeedsMutate() override;
378
374 // Called from LayerTreeImpl. 379 // Called from LayerTreeImpl.
375 void OnCanDrawStateChangedForTree(); 380 void OnCanDrawStateChangedForTree();
376 381
377 // Implementation. 382 // Implementation.
378 int id() const { return id_; } 383 int id() const { return id_; }
379 bool CanDraw() const; 384 bool CanDraw() const;
380 OutputSurface* output_surface() const { return output_surface_; } 385 OutputSurface* output_surface() const { return output_surface_; }
381 void ReleaseOutputSurface(); 386 void ReleaseOutputSurface();
382 387
383 std::string LayerTreeAsJson() const; 388 std::string LayerTreeAsJson() const;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 std::unique_ptr<Viewport> viewport_; 875 std::unique_ptr<Viewport> viewport_;
871 876
872 LayerTreeMutator* mutator_; 877 LayerTreeMutator* mutator_;
873 878
874 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 879 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
875 }; 880 };
876 881
877 } // namespace cc 882 } // namespace cc
878 883
879 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 884 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698