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

Side by Side Diff: cc/thread_proxy.h

Issue 11348083: Revert 168095 - Merge 167537 - Use message passing for BeginFrameAndCommitState and clean up forced… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years, 1 month 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/scheduler_state_machine_unittest.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 CCThreadProxy_h 5 #ifndef CCThreadProxy_h
6 #define CCThreadProxy_h 6 #define CCThreadProxy_h
7 7
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "cc/animation_events.h" 9 #include "cc/animation_events.h"
10 #include "cc/completion_event.h" 10 #include "cc/completion_event.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 74 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
75 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; 75 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE;
76 76
77 // ResourceUpdateControllerClient implementation 77 // ResourceUpdateControllerClient implementation
78 virtual void readyToFinalizeTextureUpdates() OVERRIDE; 78 virtual void readyToFinalizeTextureUpdates() OVERRIDE;
79 79
80 private: 80 private:
81 explicit ThreadProxy(LayerTreeHost*); 81 explicit ThreadProxy(LayerTreeHost*);
82 friend class ThreadProxyContextRecreationTimer; 82 friend class ThreadProxyContextRecreationTimer;
83 83
84 // Set on impl thread, read on main thread.
84 struct BeginFrameAndCommitState { 85 struct BeginFrameAndCommitState {
85 BeginFrameAndCommitState(); 86 BeginFrameAndCommitState();
86 ~BeginFrameAndCommitState(); 87 ~BeginFrameAndCommitState();
87 88
88 base::TimeTicks monotonicFrameBeginTime; 89 base::TimeTicks monotonicFrameBeginTime;
89 scoped_ptr<ScrollAndScaleSet> scrollInfo; 90 scoped_ptr<ScrollAndScaleSet> scrollInfo;
90 WebKit::WebTransformationMatrix implTransform; 91 WebKit::WebTransformationMatrix implTransform;
91 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; 92 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings;
92 size_t memoryAllocationLimitBytes; 93 size_t memoryAllocationLimitBytes;
93 }; 94 };
95 scoped_ptr<BeginFrameAndCommitState> m_pendingBeginFrameRequest;
94 96
95 // Called on main thread 97 // Called on main thread
96 void beginFrame(BeginFrameAndCommitState* beginFrameState); 98 void beginFrame();
97 void didCommitAndDrawFrame(); 99 void didCommitAndDrawFrame();
98 void didCompleteSwapBuffers(); 100 void didCompleteSwapBuffers();
99 void setAnimationEvents(AnimationEventsVector*, base::Time wallClockTime); 101 void setAnimationEvents(AnimationEventsVector*, base::Time wallClockTime);
100 void beginContextRecreation(); 102 void beginContextRecreation();
101 void tryToRecreateContext(); 103 void tryToRecreateContext();
102 104
103 // Called on impl thread 105 // Called on impl thread
104 struct ReadbackRequest { 106 struct ReadbackRequest {
105 CompletionEvent completion; 107 CompletionEvent completion;
106 bool success; 108 bool success;
(...skipping 17 matching lines...) Expand all
124 void recreateContextOnImplThread(CompletionEvent*, GraphicsContext*, bool* r ecreateSucceeded, RendererCapabilities*); 126 void recreateContextOnImplThread(CompletionEvent*, GraphicsContext*, bool* r ecreateSucceeded, RendererCapabilities*);
125 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*); 127 void renderingStatsOnImplThread(CompletionEvent*, RenderingStats*);
126 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for cedDraw); 128 ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapInternal(bool for cedDraw);
127 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*); 129 void forceSerializeOnSwapBuffersOnImplThread(CompletionEvent*);
128 void setNeedsForcedCommitOnImplThread(); 130 void setNeedsForcedCommitOnImplThread();
129 131
130 // Accessed on main thread only. 132 // Accessed on main thread only.
131 bool m_animateRequested; // Set only when setNeedsAnimate is called. 133 bool m_animateRequested; // Set only when setNeedsAnimate is called.
132 bool m_commitRequested; // Set only when setNeedsCommit is called. 134 bool m_commitRequested; // Set only when setNeedsCommit is called.
133 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA nimate. 135 bool m_commitRequestSentToImplThread; // Set by setNeedsCommit and setNeedsA nimate.
136 bool m_forcedCommitRequested;
134 scoped_ptr<ThreadProxyContextRecreationTimer> m_contextRecreationTimer; 137 scoped_ptr<ThreadProxyContextRecreationTimer> m_contextRecreationTimer;
135 LayerTreeHost* m_layerTreeHost; 138 LayerTreeHost* m_layerTreeHost;
136 bool m_rendererInitialized; 139 bool m_rendererInitialized;
137 RendererCapabilities m_RendererCapabilitiesMainThreadCopy; 140 RendererCapabilities m_RendererCapabilitiesMainThreadCopy;
138 bool m_started; 141 bool m_started;
139 bool m_texturesAcquired; 142 bool m_texturesAcquired;
140 bool m_inCompositeAndReadback; 143 bool m_inCompositeAndReadback;
141 144
142 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl; 145 scoped_ptr<LayerTreeHostImpl> m_layerTreeHostImpl;
143 146
(...skipping 23 matching lines...) Expand all
167 170
168 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad. 171 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad.
169 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; 172 bool m_nextFrameIsNewlyCommittedFrameOnImplThread;
170 173
171 bool m_renderVSyncEnabled; 174 bool m_renderVSyncEnabled;
172 175
173 base::TimeDelta m_totalCommitTime; 176 base::TimeDelta m_totalCommitTime;
174 size_t m_totalCommitCount; 177 size_t m_totalCommitCount;
175 178
176 bool m_deferCommits; 179 bool m_deferCommits;
177 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; 180 bool m_deferredCommitPending;
178 }; 181 };
179 182
180 } // namespace cc 183 } // namespace cc
181 184
182 #endif 185 #endif
OLDNEW
« no previous file with comments | « cc/scheduler_state_machine_unittest.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698