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

Side by Side Diff: cc/CCThreadProxy.h

Issue 10909020: Enable webkit_compositor_unittests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
« no previous file with comments | « cc/CCTextureUpdateControllerTest.cpp ('k') | cc/CCThreadProxy.cpp » ('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 CCThreadProxy_h 5 #ifndef CCThreadProxy_h
6 #define CCThreadProxy_h 6 #define CCThreadProxy_h
7 7
8 #include "CCAnimationEvents.h" 8 #include "CCAnimationEvents.h"
9 #include "CCCompletionEvent.h" 9 #include "CCCompletionEvent.h"
10 #include "CCLayerTreeHostImpl.h" 10 #include "CCLayerTreeHostImpl.h"
11 #include "CCProxy.h" 11 #include "CCProxy.h"
12 #include "CCScheduler.h" 12 #include "CCScheduler.h"
13 #include "CCTextureUpdateController.h"
14 #include <wtf/OwnPtr.h> 13 #include <wtf/OwnPtr.h>
15 14
16 namespace WebCore { 15 namespace WebCore {
17 16
18 class CCInputHandler; 17 class CCInputHandler;
19 class CCLayerTreeHost; 18 class CCLayerTreeHost;
20 class CCScheduler; 19 class CCScheduler;
21 class CCScopedThreadProxy; 20 class CCScopedThreadProxy;
22 class CCTextureUpdateQueue; 21 class CCTextureUpdateQueue;
22 class CCTextureUpdateController;
23 class CCThread; 23 class CCThread;
24 class CCThreadProxyContextRecreationTimer; 24 class CCThreadProxyContextRecreationTimer;
25 25
26 class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient, CCSchedulerClie nt, CCTextureUpdateControllerClient { 26 class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient, CCSchedulerClie nt {
27 public: 27 public:
28 static PassOwnPtr<CCProxy> create(CCLayerTreeHost*); 28 static PassOwnPtr<CCProxy> create(CCLayerTreeHost*);
29 29
30 virtual ~CCThreadProxy(); 30 virtual ~CCThreadProxy();
31 31
32 // CCProxy implementation 32 // CCProxy implementation
33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; 33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE;
34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE; 34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE;
35 virtual void finishAllRendering() OVERRIDE; 35 virtual void finishAllRendering() OVERRIDE;
36 virtual bool isStarted() const OVERRIDE; 36 virtual bool isStarted() const OVERRIDE;
(...skipping 20 matching lines...) Expand all
57 // CCLayerTreeHostImplClient implementation 57 // CCLayerTreeHostImplClient implementation
58 virtual void didLoseContextOnImplThread() OVERRIDE; 58 virtual void didLoseContextOnImplThread() OVERRIDE;
59 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; 59 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
60 virtual void onVSyncParametersChanged(double monotonicTimebase, double inter valInSeconds) OVERRIDE; 60 virtual void onVSyncParametersChanged(double monotonicTimebase, double inter valInSeconds) OVERRIDE;
61 virtual void setNeedsRedrawOnImplThread() OVERRIDE; 61 virtual void setNeedsRedrawOnImplThread() OVERRIDE;
62 virtual void setNeedsCommitOnImplThread() OVERRIDE; 62 virtual void setNeedsCommitOnImplThread() OVERRIDE;
63 virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimat ionEventsVector>, double wallClockTime) OVERRIDE; 63 virtual void postAnimationEventsToMainThreadOnImplThread(PassOwnPtr<CCAnimat ionEventsVector>, double wallClockTime) OVERRIDE;
64 64
65 // CCSchedulerClient implementation 65 // CCSchedulerClient implementation
66 virtual bool canDraw() OVERRIDE; 66 virtual bool canDraw() OVERRIDE;
67 virtual bool hasMoreResourceUpdates() const OVERRIDE;
67 virtual void scheduledActionBeginFrame() OVERRIDE; 68 virtual void scheduledActionBeginFrame() OVERRIDE;
68 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE; 69 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE;
69 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE; 70 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE;
70 virtual void scheduledActionUpdateMoreResources(double monotonicTimeLimit) O VERRIDE; 71 virtual void scheduledActionUpdateMoreResources(double monotonicTimeLimit) O VERRIDE;
71 virtual void scheduledActionCommit() OVERRIDE; 72 virtual void scheduledActionCommit() OVERRIDE;
72 virtual void scheduledActionBeginContextRecreation() OVERRIDE; 73 virtual void scheduledActionBeginContextRecreation() OVERRIDE;
73 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 74 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
74 75
75 // CCTextureUpdateControllerClient implementation
76 virtual void updateTexturesCompleted() OVERRIDE;
77
78 private: 76 private:
79 explicit CCThreadProxy(CCLayerTreeHost*); 77 explicit CCThreadProxy(CCLayerTreeHost*);
80 friend class CCThreadProxyContextRecreationTimer; 78 friend class CCThreadProxyContextRecreationTimer;
81 79
82 // Set on impl thread, read on main thread. 80 // Set on impl thread, read on main thread.
83 struct BeginFrameAndCommitState { 81 struct BeginFrameAndCommitState {
84 BeginFrameAndCommitState() 82 BeginFrameAndCommitState()
85 : monotonicFrameBeginTime(0) 83 : monotonicFrameBeginTime(0)
86 { 84 {
87 } 85 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); 120 void layerTreeHostClosedOnImplThread(CCCompletionEvent*);
123 void setFullRootLayerDamageOnImplThread(); 121 void setFullRootLayerDamageOnImplThread();
124 void acquireLayerTexturesForMainThreadOnImplThread(CCCompletionEvent*); 122 void acquireLayerTexturesForMainThreadOnImplThread(CCCompletionEvent*);
125 void recreateContextOnImplThread(CCCompletionEvent*, CCGraphicsContext*, boo l* recreateSucceeded, RendererCapabilities*); 123 void recreateContextOnImplThread(CCCompletionEvent*, CCGraphicsContext*, boo l* recreateSucceeded, RendererCapabilities*);
126 void implSideRenderingStatsOnImplThread(CCCompletionEvent*, CCRenderingStats *); 124 void implSideRenderingStatsOnImplThread(CCCompletionEvent*, CCRenderingStats *);
127 CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool f orcedDraw); 125 CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool f orcedDraw);
128 void forceSerializeOnSwapBuffersOnImplThread(CCCompletionEvent*); 126 void forceSerializeOnSwapBuffersOnImplThread(CCCompletionEvent*);
129 void setNeedsForcedCommitOnImplThread(); 127 void setNeedsForcedCommitOnImplThread();
130 128
131 // Accessed on main thread only. 129 // Accessed on main thread only.
132 bool m_animateRequested; 130 bool m_animateRequested; // Set only when setNeedsAnimate is called.
133 bool m_commitRequested; 131 bool m_commitRequested; // Set only when setNeedsCommit is called.
132 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA nimate.
134 bool m_forcedCommitRequested; 133 bool m_forcedCommitRequested;
135 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer; 134 OwnPtr<CCThreadProxyContextRecreationTimer> m_contextRecreationTimer;
136 CCLayerTreeHost* m_layerTreeHost; 135 CCLayerTreeHost* m_layerTreeHost;
137 int m_compositorIdentifier; 136 int m_compositorIdentifier;
138 bool m_rendererInitialized; 137 bool m_rendererInitialized;
139 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; 138 RendererCapabilities m_RendererCapabilitiesMainThreadCopy;
140 bool m_started; 139 bool m_started;
141 bool m_texturesAcquired; 140 bool m_texturesAcquired;
142 bool m_inCompositeAndReadback; 141 bool m_inCompositeAndReadback;
143 142
(...skipping 29 matching lines...) Expand all
173 172
174 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad. 173 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad.
175 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; 174 bool m_nextFrameIsNewlyCommittedFrameOnImplThread;
176 175
177 bool m_renderVSyncEnabled; 176 bool m_renderVSyncEnabled;
178 }; 177 };
179 178
180 } 179 }
181 180
182 #endif 181 #endif
OLDNEW
« no previous file with comments | « cc/CCTextureUpdateControllerTest.cpp ('k') | cc/CCThreadProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698