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

Side by Side Diff: cc/thread_proxy.h

Issue 11478039: cc: Force layer tree tests to go idle before exiting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « cc/test/layer_tree_test_common.cc ('k') | cc/thread_proxy.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_THREAD_PROXY_H_ 5 #ifndef CC_THREAD_PROXY_H_
6 #define CC_THREAD_PROXY_H_ 6 #define CC_THREAD_PROXY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/animation_events.h" 10 #include "cc/animation_events.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual void setNeedsCommit() OVERRIDE; 46 virtual void setNeedsCommit() OVERRIDE;
47 virtual void setNeedsRedraw() OVERRIDE; 47 virtual void setNeedsRedraw() OVERRIDE;
48 virtual void setDeferCommits(bool) OVERRIDE; 48 virtual void setDeferCommits(bool) OVERRIDE;
49 virtual bool commitRequested() const OVERRIDE; 49 virtual bool commitRequested() const OVERRIDE;
50 virtual void didAddAnimation() OVERRIDE { } 50 virtual void didAddAnimation() OVERRIDE { }
51 virtual void start() OVERRIDE; 51 virtual void start() OVERRIDE;
52 virtual void stop() OVERRIDE; 52 virtual void stop() OVERRIDE;
53 virtual size_t maxPartialTextureUpdates() const OVERRIDE; 53 virtual size_t maxPartialTextureUpdates() const OVERRIDE;
54 virtual void acquireLayerTextures() OVERRIDE; 54 virtual void acquireLayerTextures() OVERRIDE;
55 virtual void forceSerializeOnSwapBuffers() OVERRIDE; 55 virtual void forceSerializeOnSwapBuffers() OVERRIDE;
56 virtual bool commitPendingForTesting() OVERRIDE;
56 57
57 // LayerTreeHostImplClient implementation 58 // LayerTreeHostImplClient implementation
58 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE; 59 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE;
59 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; 60 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
60 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; 61 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE;
61 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; 62 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE;
62 virtual void setNeedsRedrawOnImplThread() OVERRIDE; 63 virtual void setNeedsRedrawOnImplThread() OVERRIDE;
63 virtual void setNeedsCommitOnImplThread() OVERRIDE; 64 virtual void setNeedsCommitOnImplThread() OVERRIDE;
64 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; 65 virtual void setNeedsManageTilesOnImplThread() OVERRIDE;
65 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE; 66 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void beginContextRecreation(); 100 void beginContextRecreation();
100 void tryToRecreateOutputSurface(); 101 void tryToRecreateOutputSurface();
101 102
102 // Called on impl thread 103 // Called on impl thread
103 struct ReadbackRequest { 104 struct ReadbackRequest {
104 CompletionEvent completion; 105 CompletionEvent completion;
105 bool success; 106 bool success;
106 void* pixels; 107 void* pixels;
107 gfx::Rect rect; 108 gfx::Rect rect;
108 }; 109 };
110 struct CommitPendingRequest {
111 CompletionEvent completion;
112 bool commitPending;
113 };
109 void forceBeginFrameOnImplThread(CompletionEvent*); 114 void forceBeginFrameOnImplThread(CompletionEvent*);
110 void beginFrameCompleteOnImplThread(CompletionEvent*, ResourceUpdateQueue*); 115 void beginFrameCompleteOnImplThread(CompletionEvent*, ResourceUpdateQueue*);
111 void beginFrameAbortedOnImplThread(); 116 void beginFrameAbortedOnImplThread();
112 void requestReadbackOnImplThread(ReadbackRequest*); 117 void requestReadbackOnImplThread(ReadbackRequest*);
113 void requestStartPageScaleAnimationOnImplThread(gfx::Vector2d targetOffset, bool useAnchor, float scale, base::TimeDelta duration); 118 void requestStartPageScaleAnimationOnImplThread(gfx::Vector2d targetOffset, bool useAnchor, float scale, base::TimeDelta duration);
114 void finishAllRenderingOnImplThread(CompletionEvent*); 119 void finishAllRenderingOnImplThread(CompletionEvent*);
115 void initializeImplOnImplThread(CompletionEvent*, InputHandler*); 120 void initializeImplOnImplThread(CompletionEvent*, InputHandler*);
116 void setSurfaceReadyOnImplThread(); 121 void setSurfaceReadyOnImplThread();
117 void setVisibleOnImplThread(CompletionEvent*, bool); 122 void setVisibleOnImplThread(CompletionEvent*, bool);
118 void initializeOutputSurfaceOnImplThread(scoped_ptr<OutputSurface>); 123 void initializeOutputSurfaceOnImplThread(scoped_ptr<OutputSurface>);
119 void initializeRendererOnImplThread(CompletionEvent*, bool* initializeSuccee ded, RendererCapabilities*); 124 void initializeRendererOnImplThread(CompletionEvent*, bool* initializeSuccee ded, RendererCapabilities*);
120 void layerTreeHostClosedOnImplThread(CompletionEvent*); 125 void layerTreeHostClosedOnImplThread(CompletionEvent*);
121 void manageTilesOnImplThread(); 126 void manageTilesOnImplThread();
122 void setFullRootLayerDamageOnImplThread(); 127 void setFullRootLayerDamageOnImplThread();
123 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*); 128 void acquireLayerTexturesForMainThreadOnImplThread(CompletionEvent*);
124 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu rface>, bool* recreateSucceeded, RendererCapabilities*); 129 void recreateOutputSurfaceOnImplThread(CompletionEvent*, scoped_ptr<OutputSu rface>, bool* recreateSucceeded, RendererCapabilities*);
125 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); 130 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*);
126 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for cedDraw); 131 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for cedDraw);
127 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); 132 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*);
128 void setNeedsForcedCommitOnImplThread(); 133 void setNeedsForcedCommitOnImplThread();
134 void commitPendingOnImplThreadForTesting(CommitPendingRequest* request);
129 135
130 // Accessed on main thread only. 136 // Accessed on main thread only.
131 bool m_animateRequested; // Set only when setNeedsAnimate is called. 137 bool m_animateRequested; // Set only when setNeedsAnimate is called.
132 bool m_commitRequested; // Set only when setNeedsCommit is called. 138 bool m_commitRequested; // Set only when setNeedsCommit is called.
133 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA nimate. 139 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA nimate.
134 base::CancelableClosure m_outputSurfaceRecreationCallback; 140 base::CancelableClosure m_outputSurfaceRecreationCallback;
135 LayerTreeHost* m_layerTreeHost; 141 LayerTreeHost* m_layerTreeHost;
136 bool m_rendererInitialized; 142 bool m_rendererInitialized;
137 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; 143 RendererCapabilities m_RendererCapabilitiesMainThreadCopy;
138 bool m_started; 144 bool m_started;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 base::TimeDelta m_totalCommitTime; 180 base::TimeDelta m_totalCommitTime;
175 size_t m_totalCommitCount; 181 size_t m_totalCommitCount;
176 182
177 bool m_deferCommits; 183 bool m_deferCommits;
178 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; 184 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit;
179 }; 185 };
180 186
181 } // namespace cc 187 } // namespace cc
182 188
183 #endif // CC_THREAD_PROXY_H_ 189 #endif // CC_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test_common.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698