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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 years 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
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 #include "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 RateLimiterMap::iterator it = m_rateLimiters.begin(); 128 RateLimiterMap::iterator it = m_rateLimiters.begin();
129 if (it != m_rateLimiters.end()) 129 if (it != m_rateLimiters.end())
130 it->second->stop(); 130 it->second->stop();
131 } 131 }
132 132
133 void LayerTreeHost::setSurfaceReady() 133 void LayerTreeHost::setSurfaceReady()
134 { 134 {
135 m_proxy->setSurfaceReady(); 135 m_proxy->setSurfaceReady();
136 } 136 }
137 137
138 void LayerTreeHost::setLatencyInfo(const WebKit::WebLatencyInfoImpl& latency_inf o)
139 {
140 m_latencyInfo = latency_info;
141 }
142
138 void LayerTreeHost::initializeRenderer() 143 void LayerTreeHost::initializeRenderer()
139 { 144 {
140 TRACE_EVENT0("cc", "LayerTreeHost::initializeRenderer"); 145 TRACE_EVENT0("cc", "LayerTreeHost::initializeRenderer");
141 if (!m_proxy->initializeRenderer()) { 146 if (!m_proxy->initializeRenderer()) {
142 // Uh oh, better tell the client that we can't do anything with this out put surface. 147 // Uh oh, better tell the client that we can't do anything with this out put surface.
143 m_client->didRecreateOutputSurface(false); 148 m_client->didRecreateOutputSurface(false);
144 return; 149 return;
145 } 150 }
146 151
147 // Update m_settings based on capabilities that we got back from the rendere r. 152 // Update m_settings based on capabilities that we got back from the rendere r.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 229
225 void LayerTreeHost::layout() 230 void LayerTreeHost::layout()
226 { 231 {
227 m_client->layout(); 232 m_client->layout();
228 } 233 }
229 234
230 void LayerTreeHost::beginCommitOnImplThread(LayerTreeHostImpl* hostImpl) 235 void LayerTreeHost::beginCommitOnImplThread(LayerTreeHostImpl* hostImpl)
231 { 236 {
232 DCHECK(m_proxy->isImplThread()); 237 DCHECK(m_proxy->isImplThread());
233 TRACE_EVENT0("cc", "LayerTreeHost::commitTo"); 238 TRACE_EVENT0("cc", "LayerTreeHost::commitTo");
239
240 hostImpl->setLatencyInfo(m_latencyInfo);
234 } 241 }
235 242
236 static void pushPropertiesRecursive(Layer* layer, LayerImpl* layerImpl) 243 static void pushPropertiesRecursive(Layer* layer, LayerImpl* layerImpl)
237 { 244 {
238 if (!layer) { 245 if (!layer) {
239 DCHECK(!layerImpl); 246 DCHECK(!layerImpl);
240 return; 247 return;
241 } 248 }
242 249
243 DCHECK_EQ(layer->id(), layerImpl->id()); 250 DCHECK_EQ(layer->id(), layerImpl->id());
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 else 874 else
868 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 875 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
869 } 876 }
870 } 877 }
871 878
872 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 879 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
873 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 880 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
874 } 881 }
875 882
876 } // namespace cc 883 } // namespace cc
OLDNEW
« cc/gl_renderer.h ('K') | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698