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

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

Issue 11364221: Fixing RenderingStats vs WebRenderingStats mess (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "cc/font_atlas.h" 7 #include "cc/font_atlas.h"
8 #include "cc/input_handler.h" 8 #include "cc/input_handler.h"
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
11 #include "cc/thread.h" 11 #include "cc/thread.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h " 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h "
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
19 #include "web_layer_impl.h" 19 #include "web_layer_impl.h"
20 #include "web_to_ccinput_handler_adapter.h" 20 #include "web_to_ccinput_handler_adapter.h"
21 #include "webkit/compositor_bindings/web_rendering_stats_impl.h"
21 22
22 using namespace cc; 23 using namespace cc;
23 24
24 namespace WebKit { 25 namespace WebKit {
25 26
26 WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client) 27 WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client)
27 : m_client(client) 28 : m_client(client)
28 { 29 {
29 } 30 }
30 31
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 m_layerTreeHost->finishAllRendering(); 162 m_layerTreeHost->finishAllRendering();
162 } 163 }
163 164
164 void WebLayerTreeViewImpl::setDeferCommits(bool deferCommits) 165 void WebLayerTreeViewImpl::setDeferCommits(bool deferCommits)
165 { 166 {
166 m_layerTreeHost->setDeferCommits(deferCommits); 167 m_layerTreeHost->setDeferCommits(deferCommits);
167 } 168 }
168 169
169 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const 170 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const
170 { 171 {
171 RenderingStats ccStats; 172 m_layerTreeHost->renderingStats(
172 m_layerTreeHost->renderingStats(&ccStats); 173 &static_cast<WebRenderingStatsImpl&>(stats).rendering_stats);
173
174 stats.numAnimationFrames = ccStats.numAnimationFrames;
175 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen;
176 stats.droppedFrameCount = ccStats.droppedFrameCount;
177 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds;
178 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds;
179 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds;
180 stats.totalCommitCount = ccStats.totalCommitCount;
181 stats.totalPixelsPainted = ccStats.totalPixelsPainted;
182 stats.totalPixelsRasterized = ccStats.totalPixelsRasterized;
183 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls;
184 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls;
185 } 174 }
186 175
187 void WebLayerTreeViewImpl::setShowFPSCounter(bool show) 176 void WebLayerTreeViewImpl::setShowFPSCounter(bool show)
188 { 177 {
189 m_layerTreeHost->setShowFPSCounter(show); 178 m_layerTreeHost->setShowFPSCounter(show);
190 } 179 }
191 180
192 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT able[128], int fontHeight) { 181 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT able[128], int fontHeight) {
193 setFontAtlas(asciiToWebRectTable, bitmap, fontHeight); 182 setFontAtlas(asciiToWebRectTable, bitmap, fontHeight);
194 } 183 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 { 259 {
271 m_client->didCompleteSwapBuffers(); 260 m_client->didCompleteSwapBuffers();
272 } 261 }
273 262
274 void WebLayerTreeViewImpl::scheduleComposite() 263 void WebLayerTreeViewImpl::scheduleComposite()
275 { 264 {
276 m_client->scheduleComposite(); 265 m_client->scheduleComposite();
277 } 266 }
278 267
279 } // namespace WebKit 268 } // namespace WebKit
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | webkit/compositor_bindings/web_rendering_stats_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698