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

Side by Side Diff: cc/thread_proxy.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 11 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 | « 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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; 61 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE; 62 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe lta interval) OVERRIDE;
63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE; 63 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE;
64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE; 64 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE;
65 virtual void setNeedsRedrawOnImplThread() OVERRIDE; 65 virtual void setNeedsRedrawOnImplThread() OVERRIDE;
66 virtual void setNeedsCommitOnImplThread() OVERRIDE; 66 virtual void setNeedsCommitOnImplThread() OVERRIDE;
67 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; 67 virtual void setNeedsManageTilesOnImplThread() OVERRIDE;
68 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE; 68 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio nEventsVector>, base::Time wallClockTime) OVERRIDE;
69 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) OVERRIDE; 69 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff) OVERRIDE;
70 virtual void sendManagedMemoryStats() OVERRIDE; 70 virtual void sendManagedMemoryStats() OVERRIDE;
71 virtual void onReceivedLatencyInfo(const LatencyInfo& latencyInfo) OVERRIDE;
71 72
72 // SchedulerClient implementation 73 // SchedulerClient implementation
73 virtual void scheduledActionBeginFrame() OVERRIDE; 74 virtual void scheduledActionBeginFrame() OVERRIDE;
74 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl e() OVERRIDE; 75 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossibl e() OVERRIDE;
75 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE; 76 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE;
76 virtual void scheduledActionCommit() OVERRIDE; 77 virtual void scheduledActionCommit() OVERRIDE;
77 virtual void scheduledActionBeginContextRecreation() OVERRIDE; 78 virtual void scheduledActionBeginContextRecreation() OVERRIDE;
78 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 79 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
79 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; 80 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE;
80 81
(...skipping 13 matching lines...) Expand all
94 size_t memoryAllocationLimitBytes; 95 size_t memoryAllocationLimitBytes;
95 }; 96 };
96 97
97 // Called on main thread 98 // Called on main thread
98 void beginFrame(scoped_ptr<BeginFrameAndCommitState> beginFrameState); 99 void beginFrame(scoped_ptr<BeginFrameAndCommitState> beginFrameState);
99 void didCommitAndDrawFrame(); 100 void didCommitAndDrawFrame();
100 void didCompleteSwapBuffers(); 101 void didCompleteSwapBuffers();
101 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime); 102 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime);
102 void beginContextRecreation(); 103 void beginContextRecreation();
103 void tryToRecreateOutputSurface(); 104 void tryToRecreateOutputSurface();
105 void receivedLatencyInfo(const LatencyInfo& latencyInfo);
104 106
105 // Called on impl thread 107 // Called on impl thread
106 struct ReadbackRequest { 108 struct ReadbackRequest {
107 CompletionEvent completion; 109 CompletionEvent completion;
108 bool success; 110 bool success;
109 void* pixels; 111 void* pixels;
110 gfx::Rect rect; 112 gfx::Rect rect;
111 }; 113 };
112 struct CommitPendingRequest { 114 struct CommitPendingRequest {
113 CompletionEvent completion; 115 CompletionEvent completion;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::TimeDelta m_totalCommitTime; 189 base::TimeDelta m_totalCommitTime;
188 size_t m_totalCommitCount; 190 size_t m_totalCommitCount;
189 191
190 bool m_deferCommits; 192 bool m_deferCommits;
191 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit; 193 scoped_ptr<BeginFrameAndCommitState> m_pendingDeferredCommit;
192 }; 194 };
193 195
194 } // namespace cc 196 } // namespace cc
195 197
196 #endif // CC_THREAD_PROXY_H_ 198 #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