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

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

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: fix comment typo Created 6 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
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class UIResourceRequest; 59 class UIResourceRequest;
60 struct RendererCapabilitiesImpl; 60 struct RendererCapabilitiesImpl;
61 61
62 // LayerTreeHost->Proxy callback interface. 62 // LayerTreeHost->Proxy callback interface.
63 class LayerTreeHostImplClient { 63 class LayerTreeHostImplClient {
64 public: 64 public:
65 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; 65 virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
66 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 66 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
67 virtual void DidSwapBuffersOnImplThread() = 0; 67 virtual void DidSwapBuffersOnImplThread() = 0;
68 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 68 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
69 virtual void BeginImplFrame(const BeginFrameArgs& args) = 0; 69 virtual void BeginFrame(const BeginFrameArgs& args) = 0;
70 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 70 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
71 virtual void NotifyReadyToActivate() = 0; 71 virtual void NotifyReadyToActivate() = 0;
72 // Please call these 2 functions through 72 // Please call these 2 functions through
73 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). 73 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect().
74 virtual void SetNeedsRedrawOnImplThread() = 0; 74 virtual void SetNeedsRedrawOnImplThread() = 0;
75 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; 75 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
76 virtual void DidInitializeVisibleTileOnImplThread() = 0; 76 virtual void DidInitializeVisibleTileOnImplThread() = 0;
77 virtual void SetNeedsCommitOnImplThread() = 0; 77 virtual void SetNeedsCommitOnImplThread() = 0;
78 virtual void SetNeedsManageTilesOnImplThread() = 0; 78 virtual void SetNeedsManageTilesOnImplThread() = 0;
79 virtual void PostAnimationEventsToMainThreadOnImplThread( 79 virtual void PostAnimationEventsToMainThreadOnImplThread(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 virtual void SetFullRootLayerDamage() OVERRIDE; 219 virtual void SetFullRootLayerDamage() OVERRIDE;
220 220
221 // TileManagerClient implementation. 221 // TileManagerClient implementation.
222 virtual void NotifyReadyToActivate() OVERRIDE; 222 virtual void NotifyReadyToActivate() OVERRIDE;
223 223
224 // OutputSurfaceClient implementation. 224 // OutputSurfaceClient implementation.
225 virtual bool DeferredInitialize( 225 virtual bool DeferredInitialize(
226 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 226 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
227 virtual void ReleaseGL() OVERRIDE; 227 virtual void ReleaseGL() OVERRIDE;
228 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; 228 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE;
229 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; 229 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE;
230 virtual void SetExternalDrawConstraints( 230 virtual void SetExternalDrawConstraints(
231 const gfx::Transform& transform, 231 const gfx::Transform& transform,
232 const gfx::Rect& viewport, 232 const gfx::Rect& viewport,
233 const gfx::Rect& clip, 233 const gfx::Rect& clip,
234 bool valid_for_tile_management) OVERRIDE; 234 bool valid_for_tile_management) OVERRIDE;
235 virtual void DidLoseOutputSurface() OVERRIDE; 235 virtual void DidLoseOutputSurface() OVERRIDE;
236 virtual void DidSwapBuffers() OVERRIDE; 236 virtual void DidSwapBuffers() OVERRIDE;
237 virtual void OnSwapBuffersComplete() OVERRIDE; 237 virtual void OnSwapBuffersComplete() OVERRIDE;
238 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; 238 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE;
239 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; 239 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE;
(...skipping 18 matching lines...) Expand all
258 void FinishAllRendering(); 258 void FinishAllRendering();
259 int SourceAnimationFrameNumber() const; 259 int SourceAnimationFrameNumber() const;
260 260
261 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); 261 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface);
262 bool IsContextLost(); 262 bool IsContextLost();
263 TileManager* tile_manager() { return tile_manager_.get(); } 263 TileManager* tile_manager() { return tile_manager_.get(); }
264 Renderer* renderer() { return renderer_.get(); } 264 Renderer* renderer() { return renderer_.get(); }
265 const RendererCapabilitiesImpl& GetRendererCapabilities() const; 265 const RendererCapabilitiesImpl& GetRendererCapabilities() const;
266 266
267 virtual bool SwapBuffers(const FrameData& frame); 267 virtual bool SwapBuffers(const FrameData& frame);
268 void SetNeedsBeginImplFrame(bool enable); 268 void SetNeedsBeginFrame(bool enable);
269 virtual void WillBeginImplFrame(const BeginFrameArgs& args);
269 void DidModifyTilePriorities(); 270 void DidModifyTilePriorities();
270 271
271 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport); 272 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport);
272 273
273 LayerTreeImpl* active_tree() { return active_tree_.get(); } 274 LayerTreeImpl* active_tree() { return active_tree_.get(); }
274 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 275 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
275 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 276 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
276 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 277 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
277 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } 278 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); }
278 virtual void CreatePendingTree(); 279 virtual void CreatePendingTree();
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 int id_; 659 int id_;
659 660
660 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 661 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
661 662
662 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 663 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
663 }; 664 };
664 665
665 } // namespace cc 666 } // namespace cc
666 667
667 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 668 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698