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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 11833009: Provide a vsync notification to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/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_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_
6 #define CC_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 29 matching lines...) Expand all
40 class TopControlsManager; 40 class TopControlsManager;
41 struct RendererCapabilities; 41 struct RendererCapabilities;
42 struct RenderingStats; 42 struct RenderingStats;
43 43
44 // LayerTreeHost->Proxy callback interface. 44 // LayerTreeHost->Proxy callback interface.
45 class LayerTreeHostImplClient { 45 class LayerTreeHostImplClient {
46 public: 46 public:
47 virtual void didLoseOutputSurfaceOnImplThread() = 0; 47 virtual void didLoseOutputSurfaceOnImplThread() = 0;
48 virtual void onSwapBuffersCompleteOnImplThread() = 0; 48 virtual void onSwapBuffersCompleteOnImplThread() = 0;
49 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) = 0; 49 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) = 0;
50 virtual void didVSync(base::TimeTicks frameTime) = 0;
50 virtual void onCanDrawStateChanged(bool canDraw) = 0; 51 virtual void onCanDrawStateChanged(bool canDraw) = 0;
51 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; 52 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0;
52 virtual void setNeedsRedrawOnImplThread() = 0; 53 virtual void setNeedsRedrawOnImplThread() = 0;
53 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; 54 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0;
54 virtual void setNeedsCommitOnImplThread() = 0; 55 virtual void setNeedsCommitOnImplThread() = 0;
55 virtual void setNeedsManageTilesOnImplThread() = 0; 56 virtual void setNeedsManageTilesOnImplThread() = 0;
56 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0; 57 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0;
57 // Returns true if resources were deleted by this call. 58 // Returns true if resources were deleted by this call.
58 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0; 59 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0;
59 virtual void reduceWastedContentsTextureMemoryOnImplThread() = 0; 60 virtual void reduceWastedContentsTextureMemoryOnImplThread() = 0;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual bool hasImplThread() const OVERRIDE; 135 virtual bool hasImplThread() const OVERRIDE;
135 virtual bool shouldClearRootRenderPass() const OVERRIDE; 136 virtual bool shouldClearRootRenderPass() const OVERRIDE;
136 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ; 137 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ;
137 138
138 // TileManagerClient implementation. 139 // TileManagerClient implementation.
139 virtual void ScheduleManageTiles() OVERRIDE; 140 virtual void ScheduleManageTiles() OVERRIDE;
140 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; 141 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE;
141 142
142 // OutputSurfaceClient implementation. 143 // OutputSurfaceClient implementation.
143 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; 144 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE;
145 virtual void DidVSync(base::TimeTicks frameTime) OVERRIDE;
144 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE; 146 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE;
145 147
146 // Called from LayerTreeImpl. 148 // Called from LayerTreeImpl.
147 void OnCanDrawStateChangedForTree(LayerTreeImpl*); 149 void OnCanDrawStateChangedForTree(LayerTreeImpl*);
148 150
149 // Implementation 151 // Implementation
150 bool canDraw(); 152 bool canDraw();
151 OutputSurface* outputSurface() const; 153 OutputSurface* outputSurface() const;
154 void enableVSyncNotification(bool enable);
152 155
153 std::string layerTreeAsText() const; 156 std::string layerTreeAsText() const;
154 std::string layerTreeAsJson() const; 157 std::string layerTreeAsJson() const;
155 158
156 void finishAllRendering(); 159 void finishAllRendering();
157 int sourceAnimationFrameNumber() const; 160 int sourceAnimationFrameNumber() const;
158 161
159 bool initializeRenderer(scoped_ptr<OutputSurface>); 162 bool initializeRenderer(scoped_ptr<OutputSurface>);
160 bool isContextLost(); 163 bool isContextLost();
161 TileManager* tileManager() { return m_tileManager.get(); } 164 TileManager* tileManager() { return m_tileManager.get(); }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 base::TimeTicks m_currentFrameTime; 366 base::TimeTicks m_currentFrameTime;
364 367
365 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 368 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
366 369
367 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 370 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
368 }; 371 };
369 372
370 } // namespace cc 373 } // namespace cc
371 374
372 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 375 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698