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

Side by Side Diff: cc/layer_tree_host.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/latency_info.h ('k') | cc/layer_tree_host.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_LAYER_TREE_HOST_H_ 5 #ifndef CC_LAYER_TREE_HOST_H_
6 #define CC_LAYER_TREE_HOST_H_ 6 #define CC_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/cancelable_callback.h" 11 #include "base/cancelable_callback.h"
12 #include "base/hash_tables.h" 12 #include "base/hash_tables.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "cc/animation_events.h" 16 #include "cc/animation_events.h"
17 #include "cc/cc_export.h" 17 #include "cc/cc_export.h"
18 #include "cc/latency_info.h"
18 #include "cc/layer_tree_host_client.h" 19 #include "cc/layer_tree_host_client.h"
19 #include "cc/layer_tree_host_common.h" 20 #include "cc/layer_tree_host_common.h"
20 #include "cc/layer_tree_settings.h" 21 #include "cc/layer_tree_settings.h"
21 #include "cc/occlusion_tracker.h" 22 #include "cc/occlusion_tracker.h"
22 #include "cc/output_surface.h" 23 #include "cc/output_surface.h"
23 #include "cc/prioritized_resource_manager.h" 24 #include "cc/prioritized_resource_manager.h"
24 #include "cc/proxy.h" 25 #include "cc/proxy.h"
25 #include "cc/rate_limiter.h" 26 #include "cc/rate_limiter.h"
26 #include "cc/rendering_stats.h" 27 #include "cc/rendering_stats.h"
27 #include "cc/scoped_ptr_vector.h" 28 #include "cc/scoped_ptr_vector.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*); 99 virtual scoped_ptr<LayerTreeHostImpl> createLayerTreeHostImpl(LayerTreeHostI mplClient*);
99 void didLoseOutputSurface(); 100 void didLoseOutputSurface();
100 enum RecreateResult { 101 enum RecreateResult {
101 RecreateSucceeded, 102 RecreateSucceeded,
102 RecreateFailedButTryAgain, 103 RecreateFailedButTryAgain,
103 RecreateFailedAndGaveUp, 104 RecreateFailedAndGaveUp,
104 }; 105 };
105 RecreateResult recreateOutputSurface(); 106 RecreateResult recreateOutputSurface();
106 void didCommitAndDrawFrame() { m_client->didCommitAndDrawFrame(); } 107 void didCommitAndDrawFrame() { m_client->didCommitAndDrawFrame(); }
107 void didCompleteSwapBuffers() { m_client->didCompleteSwapBuffers(); } 108 void didCompleteSwapBuffers() { m_client->didCompleteSwapBuffers(); }
109 void onReceivedLatencyInfo(const LatencyInfo& latencyInfo) { m_client->onRec eivedLatencyInfo(latencyInfo); }
108 void deleteContentsTexturesOnImplThread(ResourceProvider*); 110 void deleteContentsTexturesOnImplThread(ResourceProvider*);
109 virtual void acquireLayerTextures(); 111 virtual void acquireLayerTextures();
110 // Returns false if we should abort this frame due to initialization failure . 112 // Returns false if we should abort this frame due to initialization failure .
111 bool initializeRendererIfNeeded(); 113 bool initializeRendererIfNeeded();
112 void updateLayers(ResourceUpdateQueue&, size_t contentsMemoryLimitBytes); 114 void updateLayers(ResourceUpdateQueue&, size_t contentsMemoryLimitBytes);
113 115
114 LayerTreeHostClient* client() { return m_client; } 116 LayerTreeHostClient* client() { return m_client; }
115 117
116 void composite(); 118 void composite();
117 119
(...skipping 21 matching lines...) Expand all
139 // Test only hook 141 // Test only hook
140 void loseOutputSurface(int numTimes); 142 void loseOutputSurface(int numTimes);
141 143
142 void setNeedsAnimate(); 144 void setNeedsAnimate();
143 // virtual for testing 145 // virtual for testing
144 virtual void setNeedsCommit(); 146 virtual void setNeedsCommit();
145 virtual void setNeedsFullTreeSync(); 147 virtual void setNeedsFullTreeSync();
146 void setNeedsRedraw(); 148 void setNeedsRedraw();
147 bool commitRequested() const; 149 bool commitRequested() const;
148 150
151 void setLatencyInfo(const LatencyInfo& latency_info);
152
149 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime); 153 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl ockTime);
150 154
151 Layer* rootLayer() { return m_rootLayer.get(); } 155 Layer* rootLayer() { return m_rootLayer.get(); }
152 const Layer* rootLayer() const { return m_rootLayer.get(); } 156 const Layer* rootLayer() const { return m_rootLayer.get(); }
153 void setRootLayer(scoped_refptr<Layer>); 157 void setRootLayer(scoped_refptr<Layer>);
154 158
155 const LayerTreeSettings& settings() const { return m_settings; } 159 const LayerTreeSettings& settings() const { return m_settings; }
156 160
157 void setDebugState(const LayerTreeDebugState& debugState); 161 void setDebugState(const LayerTreeDebugState& debugState);
158 const LayerTreeDebugState& debugState() const { return m_debugState; } 162 const LayerTreeDebugState& debugState() const { return m_debugState; }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 SkColor m_backgroundColor; 276 SkColor m_backgroundColor;
273 bool m_hasTransparentBackground; 277 bool m_hasTransparentBackground;
274 278
275 typedef ScopedPtrVector<PrioritizedResource> TextureList; 279 typedef ScopedPtrVector<PrioritizedResource> TextureList;
276 size_t m_partialTextureUpdateRequests; 280 size_t m_partialTextureUpdateRequests;
277 281
278 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 282 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
279 283
280 static bool s_needsFilterContext; 284 static bool s_needsFilterContext;
281 285
286 LatencyInfo m_latencyInfo;
287
282 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 288 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
283 }; 289 };
284 290
285 } // namespace cc 291 } // namespace cc
286 292
287 #endif // CC_LAYER_TREE_HOST_H_ 293 #endif // CC_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/latency_info.h ('k') | cc/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698