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

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: rebase 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class UIResourceRequest; 56 class UIResourceRequest;
57 struct RendererCapabilitiesImpl; 57 struct RendererCapabilitiesImpl;
58 58
59 // LayerTreeHost->Proxy callback interface. 59 // LayerTreeHost->Proxy callback interface.
60 class LayerTreeHostImplClient { 60 class LayerTreeHostImplClient {
61 public: 61 public:
62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; 62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
63 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 63 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
64 virtual void DidSwapBuffersOnImplThread() = 0; 64 virtual void DidSwapBuffersOnImplThread() = 0;
65 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 65 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
66 virtual void BeginImplFrame(const BeginFrameArgs& args) = 0; 66 virtual void BeginFrame(const BeginFrameArgs& args) = 0;
67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 67 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
68 virtual void NotifyReadyToActivate() = 0; 68 virtual void NotifyReadyToActivate() = 0;
69 // Please call these 2 functions through 69 // Please call these 2 functions through
70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). 70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect().
71 virtual void SetNeedsRedrawOnImplThread() = 0; 71 virtual void SetNeedsRedrawOnImplThread() = 0;
72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; 72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
73 virtual void DidInitializeVisibleTileOnImplThread() = 0; 73 virtual void DidInitializeVisibleTileOnImplThread() = 0;
74 virtual void SetNeedsCommitOnImplThread() = 0; 74 virtual void SetNeedsCommitOnImplThread() = 0;
75 virtual void SetNeedsManageTilesOnImplThread() = 0; 75 virtual void SetNeedsManageTilesOnImplThread() = 0;
76 virtual void PostAnimationEventsToMainThreadOnImplThread( 76 virtual void PostAnimationEventsToMainThreadOnImplThread(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual void SetFullRootLayerDamage() OVERRIDE; 216 virtual void SetFullRootLayerDamage() OVERRIDE;
217 217
218 // TileManagerClient implementation. 218 // TileManagerClient implementation.
219 virtual void NotifyReadyToActivate() OVERRIDE; 219 virtual void NotifyReadyToActivate() OVERRIDE;
220 220
221 // OutputSurfaceClient implementation. 221 // OutputSurfaceClient implementation.
222 virtual bool DeferredInitialize( 222 virtual bool DeferredInitialize(
223 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 223 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
224 virtual void ReleaseGL() OVERRIDE; 224 virtual void ReleaseGL() OVERRIDE;
225 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; 225 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE;
226 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; 226 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE;
227 virtual void SetExternalDrawConstraints( 227 virtual void SetExternalDrawConstraints(
228 const gfx::Transform& transform, 228 const gfx::Transform& transform,
229 const gfx::Rect& viewport, 229 const gfx::Rect& viewport,
230 const gfx::Rect& clip, 230 const gfx::Rect& clip,
231 bool valid_for_tile_management) OVERRIDE; 231 bool valid_for_tile_management) OVERRIDE;
232 virtual void DidLoseOutputSurface() OVERRIDE; 232 virtual void DidLoseOutputSurface() OVERRIDE;
233 virtual void DidSwapBuffers() OVERRIDE; 233 virtual void DidSwapBuffers() OVERRIDE;
234 virtual void OnSwapBuffersComplete() OVERRIDE; 234 virtual void OnSwapBuffersComplete() OVERRIDE;
235 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; 235 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE;
236 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; 236 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE;
(...skipping 18 matching lines...) Expand all
255 void FinishAllRendering(); 255 void FinishAllRendering();
256 int SourceAnimationFrameNumber() const; 256 int SourceAnimationFrameNumber() const;
257 257
258 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); 258 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface);
259 bool IsContextLost(); 259 bool IsContextLost();
260 TileManager* tile_manager() { return tile_manager_.get(); } 260 TileManager* tile_manager() { return tile_manager_.get(); }
261 Renderer* renderer() { return renderer_.get(); } 261 Renderer* renderer() { return renderer_.get(); }
262 const RendererCapabilitiesImpl& GetRendererCapabilities() const; 262 const RendererCapabilitiesImpl& GetRendererCapabilities() const;
263 263
264 virtual bool SwapBuffers(const FrameData& frame); 264 virtual bool SwapBuffers(const FrameData& frame);
265 void SetNeedsBeginImplFrame(bool enable); 265 void SetNeedsBeginFrame(bool enable);
266 virtual void WillBeginImplFrame(const BeginFrameArgs& args);
266 void DidModifyTilePriorities(); 267 void DidModifyTilePriorities();
267 268
268 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport); 269 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport);
269 270
270 LayerTreeImpl* active_tree() { return active_tree_.get(); } 271 LayerTreeImpl* active_tree() { return active_tree_.get(); }
271 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 272 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
272 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 273 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
273 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 274 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
274 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } 275 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); }
275 virtual void CreatePendingTree(); 276 virtual void CreatePendingTree();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 int id_; 653 int id_;
653 654
654 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 655 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
655 656
656 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
657 }; 658 };
658 659
659 } // namespace cc 660 } // namespace cc
660 661
661 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698