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

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: 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/raster_worker_pool.cc » ('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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 setNeedsCommitOnImplThread() = 0; 54 virtual void setNeedsCommitOnImplThread() = 0;
55 virtual void setNeedsManageTilesOnImplThread() = 0; 55 virtual void setNeedsManageTilesOnImplThread() = 0;
56 virtual void setNeedsCheckForCompletedRasterTasksOnImplThread() = 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;
60 virtual void sendManagedMemoryStats() = 0; 61 virtual void sendManagedMemoryStats() = 0;
61 virtual bool isInsideDraw() = 0; 62 virtual bool isInsideDraw() = 0;
62 virtual void renewTreePriority() = 0; 63 virtual void renewTreePriority() = 0;
63 }; 64 };
64 65
65 // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering sta te 66 // 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; 131 virtual void onSwapBuffersComplete() OVERRIDE;
131 virtual void setFullRootLayerDamage() OVERRIDE; 132 virtual void setFullRootLayerDamage() OVERRIDE;
132 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE; 133 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR IDE;
133 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE; 134 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O VERRIDE;
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;
141 virtual void ScheduleCheckForCompletedRasterTasks() OVERRIDE;
140 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE; 142 virtual void DidUploadVisibleHighResolutionTile() OVERRIDE;
141 143
142 // OutputSurfaceClient implementation. 144 // OutputSurfaceClient implementation.
143 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; 145 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) 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
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 255
254 skia::RefPtr<SkPicture> capturePicture(); 256 skia::RefPtr<SkPicture> capturePicture();
255 257
256 bool pinchGestureActive() const { return m_pinchGestureActive; } 258 bool pinchGestureActive() const { return m_pinchGestureActive; }
257 259
258 void setTreePriority(TreePriority priority); 260 void setTreePriority(TreePriority priority);
259 261
260 void beginNextFrame(); 262 void beginNextFrame();
261 base::TimeTicks currentFrameTime(); 263 base::TimeTicks currentFrameTime();
262 264
265 void checkForCompletedRasterTasks();
266
263 protected: 267 protected:
264 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* ); 268 LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy* );
265 void activatePendingTree(); 269 void activatePendingTree();
266 270
267 // Virtual for testing. 271 // Virtual for testing.
268 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime); 272 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime);
269 virtual void updateAnimationState(); 273 virtual void updateAnimationState();
270 274
271 // Virtual for testing. 275 // Virtual for testing.
272 virtual base::TimeDelta lowFrequencyAnimationInterval() const; 276 virtual base::TimeDelta lowFrequencyAnimationInterval() const;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 base::TimeTicks m_currentFrameTime; 372 base::TimeTicks m_currentFrameTime;
369 373
370 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 374 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
371 375
372 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 376 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
373 }; 377 };
374 378
375 } // namespace cc 379 } // namespace cc
376 380
377 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 381 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.cc » ('j') | cc/raster_worker_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698