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

Side by Side Diff: cc/CCThreadProxy.h

Issue 10916292: Adaptively throttle texture uploads (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc_unittests passing again 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
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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual void implSideRenderingStats(CCRenderingStats&) OVERRIDE; 42 virtual void implSideRenderingStats(CCRenderingStats&) OVERRIDE;
43 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; 43 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE;
44 virtual void loseContext() OVERRIDE; 44 virtual void loseContext() OVERRIDE;
45 virtual void setNeedsAnimate() OVERRIDE; 45 virtual void setNeedsAnimate() OVERRIDE;
46 virtual void setNeedsCommit() OVERRIDE; 46 virtual void setNeedsCommit() OVERRIDE;
47 virtual void setNeedsRedraw() OVERRIDE; 47 virtual void setNeedsRedraw() OVERRIDE;
48 virtual bool commitRequested() const OVERRIDE; 48 virtual bool commitRequested() const OVERRIDE;
49 virtual void didAddAnimation() OVERRIDE { } 49 virtual void didAddAnimation() OVERRIDE { }
50 virtual void start() OVERRIDE; 50 virtual void start() OVERRIDE;
51 virtual void stop() OVERRIDE; 51 virtual void stop() OVERRIDE;
52 virtual size_t maxPartialTextureUpdates() const OVERRIDE;
53 virtual void acquireLayerTextures() OVERRIDE; 52 virtual void acquireLayerTextures() OVERRIDE;
54 virtual void forceSerializeOnSwapBuffers() OVERRIDE; 53 virtual void forceSerializeOnSwapBuffers() OVERRIDE;
55 54
56 // CCLayerTreeHostImplClient implementation 55 // CCLayerTreeHostImplClient implementation
57 virtual void didLoseContextOnImplThread() OVERRIDE; 56 virtual void didLoseContextOnImplThread() OVERRIDE;
58 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; 57 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
59 virtual void onVSyncParametersChanged(double monotonicTimebase, double inter valInSeconds) OVERRIDE; 58 virtual void onVSyncParametersChanged(double monotonicTimebase, double inter valInSeconds) OVERRIDE;
60 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; 59 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE;
61 virtual void setNeedsRedrawOnImplThread() OVERRIDE; 60 virtual void setNeedsRedrawOnImplThread() OVERRIDE;
62 virtual void setNeedsCommitOnImplThread() OVERRIDE; 61 virtual void setNeedsCommitOnImplThread() OVERRIDE;
(...skipping 23 matching lines...) Expand all
86 } 85 }
87 86
88 double monotonicFrameBeginTime; 87 double monotonicFrameBeginTime;
89 OwnPtr<CCScrollAndScaleSet> scrollInfo; 88 OwnPtr<CCScrollAndScaleSet> scrollInfo;
90 bool contentsTexturesWereDeleted; 89 bool contentsTexturesWereDeleted;
91 size_t memoryAllocationLimitBytes; 90 size_t memoryAllocationLimitBytes;
92 }; 91 };
93 OwnPtr<BeginFrameAndCommitState> m_pendingBeginFrameRequest; 92 OwnPtr<BeginFrameAndCommitState> m_pendingBeginFrameRequest;
94 93
95 // Called on main thread 94 // Called on main thread
96 void beginFrame(); 95 void beginFrame(size_t maxPartialTextureUpdates);
97 void didCommitAndDrawFrame(); 96 void didCommitAndDrawFrame();
98 void didCompleteSwapBuffers(); 97 void didCompleteSwapBuffers();
99 void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallCloc kTime); 98 void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallCloc kTime);
100 void beginContextRecreation(); 99 void beginContextRecreation();
101 void tryToRecreateContext(); 100 void tryToRecreateContext();
102 101
103 // Called on impl thread 102 // Called on impl thread
104 struct ReadbackRequest { 103 struct ReadbackRequest {
105 CCCompletionEvent completion; 104 CCCompletionEvent completion;
106 bool success; 105 bool success;
107 void* pixels; 106 void* pixels;
108 IntRect rect; 107 IntRect rect;
109 }; 108 };
110 void forceBeginFrameOnImplThread(CCCompletionEvent*); 109 void forceBeginFrameOnImplThread(CCCompletionEvent*);
111 void beginFrameCompleteOnImplThread(CCCompletionEvent*, PassOwnPtr<CCTexture UpdateQueue>, bool contentsTexturesWereDeleted); 110 void beginFrameCompleteOnImplThread(CCCompletionEvent*, PassOwnPtr<CCTexture UpdateQueue>, bool contentsTexturesWereDeleted, size_t maxPartialTextureUpdates) ;
112 void beginFrameAbortedOnImplThread(); 111 void beginFrameAbortedOnImplThread();
113 void requestReadbackOnImplThread(ReadbackRequest*); 112 void requestReadbackOnImplThread(ReadbackRequest*);
114 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool useAnchor, float scale, double durationSec); 113 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool useAnchor, float scale, double durationSec);
115 void finishAllRenderingOnImplThread(CCCompletionEvent*); 114 void finishAllRenderingOnImplThread(CCCompletionEvent*);
116 void initializeImplOnImplThread(CCCompletionEvent*, PassOwnPtr<CCInputHandle r>); 115 void initializeImplOnImplThread(CCCompletionEvent*, PassOwnPtr<CCInputHandle r>);
117 void setSurfaceReadyOnImplThread(); 116 void setSurfaceReadyOnImplThread();
118 void setVisibleOnImplThread(CCCompletionEvent*, bool); 117 void setVisibleOnImplThread(CCCompletionEvent*, bool);
119 void initializeContextOnImplThread(CCGraphicsContext*); 118 void initializeContextOnImplThread(CCGraphicsContext*);
120 void initializeRendererOnImplThread(CCCompletionEvent*, bool* initializeSucc eeded, RendererCapabilities*); 119 void initializeRendererOnImplThread(CCCompletionEvent*, bool* initializeSucc eeded, RendererCapabilities*);
121 void layerTreeHostClosedOnImplThread(CCCompletionEvent*); 120 void layerTreeHostClosedOnImplThread(CCCompletionEvent*);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 171
173 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad. 172 // Set when the next draw should post didCommitAndDrawFrame to the main thre ad.
174 bool m_nextFrameIsNewlyCommittedFrameOnImplThread; 173 bool m_nextFrameIsNewlyCommittedFrameOnImplThread;
175 174
176 bool m_renderVSyncEnabled; 175 bool m_renderVSyncEnabled;
177 }; 176 };
178 177
179 } 178 }
180 179
181 #endif 180 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698