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

Side by Side Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

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
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 "web_layer_tree_view_impl.h" 5 #include "web_layer_tree_view_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/font_atlas.h" 8 #include "cc/font_atlas.h"
9 #include "cc/input_handler.h" 9 #include "cc/input_handler.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
11 #include "cc/layer_tree_host.h" 11 #include "cc/layer_tree_host.h"
12 #include "cc/switches.h" 12 #include "cc/switches.h"
13 #include "cc/thread.h" 13 #include "cc/thread.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h" 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h"
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h " 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h "
20 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
21 #include "web_layer_impl.h" 21 #include "web_layer_impl.h"
22 #include "web_to_ccinput_handler_adapter.h" 22 #include "web_to_ccinput_handler_adapter.h"
23 #include "webkit/compositor_bindings/web_latency_info_impl.h"
23 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" 24 #include "webkit/compositor_bindings/web_rendering_stats_impl.h"
24 25
25 using namespace cc; 26 using namespace cc;
26 27
27 namespace WebKit { 28 namespace WebKit {
28 29
29 WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client) 30 WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client)
30 : m_client(client) 31 : m_client(client)
31 { 32 {
32 } 33 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 asciiToRectTable[i] = asciiToWebRectTable[i]; 217 asciiToRectTable[i] = asciiToWebRectTable[i];
217 218
218 return FontAtlas::create(bitmap, asciiToRectTable, fontHeight).Pass(); 219 return FontAtlas::create(bitmap, asciiToRectTable, fontHeight).Pass();
219 } 220 }
220 221
221 void WebLayerTreeViewImpl::loseCompositorContext(int numTimes) 222 void WebLayerTreeViewImpl::loseCompositorContext(int numTimes)
222 { 223 {
223 m_layerTreeHost->loseOutputSurface(numTimes); 224 m_layerTreeHost->loseOutputSurface(numTimes);
224 } 225 }
225 226
227 void WebLayerTreeViewImpl::setLatencyInfo(const WebKit::WebLatencyInfo& latencyI nfo)
228 {
229 m_layerTreeHost->setLatencyInfo(static_cast<const WebKit::WebLatencyInfoImpl &>(latencyInfo).latency_info);
230 }
231
226 void WebLayerTreeViewImpl::willBeginFrame() 232 void WebLayerTreeViewImpl::willBeginFrame()
227 { 233 {
228 m_client->willBeginFrame(); 234 m_client->willBeginFrame();
229 } 235 }
230 236
231 void WebLayerTreeViewImpl::didBeginFrame() 237 void WebLayerTreeViewImpl::didBeginFrame()
232 { 238 {
233 m_client->didBeginFrame(); 239 m_client->didBeginFrame();
234 } 240 }
235 241
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 void WebLayerTreeViewImpl::didCompleteSwapBuffers() 292 void WebLayerTreeViewImpl::didCompleteSwapBuffers()
287 { 293 {
288 m_client->didCompleteSwapBuffers(); 294 m_client->didCompleteSwapBuffers();
289 } 295 }
290 296
291 void WebLayerTreeViewImpl::scheduleComposite() 297 void WebLayerTreeViewImpl::scheduleComposite()
292 { 298 {
293 m_client->scheduleComposite(); 299 m_client->scheduleComposite();
294 } 300 }
295 301
302 void WebLayerTreeViewImpl::onReceivedLatencyInfo(const cc::LatencyInfo& latencyI nfo)
303 {
304 WebKit::WebLatencyInfoImpl latencyInfoImpl;
305 latencyInfoImpl.latency_info = latencyInfo;
306 m_client->onReceivedLatencyInfo(static_cast<const WebKit::WebLatencyInfo&>(l atencyInfoImpl));
307 }
308
296 } // namespace WebKit 309 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698