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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 12217105: cc: Check for completed raster tasks at interval. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Post task to impl thread when worker pool becomes idle. 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') | cc/worker_pool.h » ('J')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 onCanDrawStateChanged(bool canDraw) = 0; 50 virtual void onCanDrawStateChanged(bool canDraw) = 0;
51 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; 51 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0;
52 virtual void setNeedsRedrawOnImplThread() = 0; 52 virtual void setNeedsRedrawOnImplThread() = 0;
53 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0; 53 virtual void didUploadVisibleHighResolutionTileOnImplThread() = 0;
54 virtual void didDetectIdleRasterOnImplThread() = 0;
54 virtual void setNeedsCommitOnImplThread() = 0; 55 virtual void setNeedsCommitOnImplThread() = 0;
55 virtual void setNeedsManageTilesOnImplThread() = 0; 56 virtual void setNeedsManageTilesOnImplThread() = 0;
57 virtual void setNeedsCheckForCompletedRasterTasksOnImplThread() = 0;
56 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0; 58 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) = 0;
57 // Returns true if resources were deleted by this call. 59 // Returns true if resources were deleted by this call.
58 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0; 60 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) = 0;
59 virtual void reduceWastedContentsTextureMemoryOnImplThread() = 0; 61 virtual void reduceWastedContentsTextureMemoryOnImplThread() = 0;
60 virtual void sendManagedMemoryStats() = 0; 62 virtual void sendManagedMemoryStats() = 0;
61 virtual bool isInsideDraw() = 0; 63 virtual bool isInsideDraw() = 0;
62 virtual void renewTreePriority() = 0; 64 virtual void renewTreePriority() = 0;
63 }; 65 };
64 66
65 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta te 67 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta te
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual void onSwapBuffersComplete() OVERRIDE; 132 virtual void onSwapBuffersComplete() OVERRIDE;
131 virtual void setFullRootLayerDamage() OVERRIDE; 133 virtual void setFullRootLayerDamage() OVERRIDE;
132 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE; 134 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE;
133 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE; 135 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE;
134 virtual bool hasImplThread() const OVERRIDE; 136 virtual bool hasImplThread() const OVERRIDE;
135 virtual bool shouldClearRootRenderPass() const OVERRIDE; 137 virtual bool shouldClearRootRenderPass() const OVERRIDE;
136 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ; 138 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const OVERRIDE ;
137 139
138 // TileManagerClient implementation. 140 // TileManagerClient implementation.
139 virtual void ScheduleManageTiles() OVERRIDE; 141 virtual void ScheduleManageTiles() OVERRIDE;
142 virtual void ScheduleCheckForCompletedRasterTasks() OVERRIDE;
140 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; 143 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE;
144 virtual void DidDetectIdleRaster() OVERRIDE;
141 145
142 // OutputSurfaceClient implementation. 146 // OutputSurfaceClient implementation.
143 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; 147 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE;
144 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE; 148 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) OVE RRIDE;
145 149
146 // Called from LayerTreeImpl. 150 // Called from LayerTreeImpl.
147 void OnCanDrawStateChangedForTree(LayerTreeImpl*); 151 void OnCanDrawStateChangedForTree(LayerTreeImpl*);
148 152
149 // Implementation 153 // Implementation
150 bool canDraw(); 154 bool canDraw();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 260
257 void setTreePriority(TreePriority priority); 261 void setTreePriority(TreePriority priority);
258 262
259 void beginNextFrame(); 263 void beginNextFrame();
260 base::TimeTicks currentFrameTime(); 264 base::TimeTicks currentFrameTime();
261 265
262 scoped_ptr<base::Value> asValue() const; 266 scoped_ptr<base::Value> asValue() const;
263 scoped_ptr<base::Value> activationStateAsValue() const; 267 scoped_ptr<base::Value> activationStateAsValue() const;
264 scoped_ptr<base::Value> frameStateAsValue() const; 268 scoped_ptr<base::Value> frameStateAsValue() const;
265 269
270 void checkForCompletedRasterTasks();
271
266 protected: 272 protected:
267 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* ); 273 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* );
268 void activatePendingTree(); 274 void activatePendingTree();
269 275
270 // Virtual for testing. 276 // Virtual for testing.
271 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime); 277 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime);
272 virtual void updateAnimationState(); 278 virtual void updateAnimationState();
273 279
274 // Virtual for testing. 280 // Virtual for testing.
275 virtual base::TimeDelta lowFrequencyAnimationInterval() const; 281 virtual base::TimeDelta lowFrequencyAnimationInterval() const;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 base::TimeTicks m_currentFrameTime; 377 base::TimeTicks m_currentFrameTime;
372 378
373 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 379 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
374 380
375 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 381 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
376 }; 382 };
377 383
378 } // namespace cc 384 } // namespace cc
379 385
380 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 386 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.cc » ('j') | cc/worker_pool.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698