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

Side by Side Diff: content/renderer/render_widget.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "cc/rendering_stats.h"
Ian Vollick 2012/11/13 21:26:06 Already included in the header.
hartmanng 2012/11/13 21:42:53 Done.
17 #include "content/common/swapped_out_messages.h" 18 #include "content/common/swapped_out_messages.h"
18 #include "content/common/view_messages.h" 19 #include "content/common/view_messages.h"
19 #include "content/public/common/content_switches.h" 20 #include "content/public/common/content_switches.h"
20 #include "content/renderer/render_process.h" 21 #include "content/renderer/render_process.h"
21 #include "content/renderer/render_thread_impl.h" 22 #include "content/renderer/render_thread_impl.h"
22 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 23 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
23 #include "ipc/ipc_sync_message.h" 24 #include "ipc/ipc_sync_message.h"
24 #include "skia/ext/platform_canvas.h" 25 #include "skia/ext/platform_canvas.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h"
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { 1914 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
1914 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); 1915 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin();
1915 i != plugin_window_moves_.end(); ++i) { 1916 i != plugin_window_moves_.end(); ++i) {
1916 if (i->window == window) { 1917 if (i->window == window) {
1917 plugin_window_moves_.erase(i); 1918 plugin_window_moves_.erase(i);
1918 break; 1919 break;
1919 } 1920 }
1920 } 1921 }
1921 } 1922 }
1922 1923
1924 #ifdef NOT_USING_WEB_RENDERING_STATS
1925 void RenderWidget::GetRenderingStats(cc::RenderingStats& stats) const {
1926 webwidget()->renderingStats(&stats);
1927 #else
1923 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { 1928 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const {
1924 webwidget()->renderingStats(stats); 1929 webwidget()->renderingStats(stats);
1930 #endif // NOT_USING_WEB_RENDERING_STATS
1925 stats.numAnimationFrames += software_stats_.numAnimationFrames; 1931 stats.numAnimationFrames += software_stats_.numAnimationFrames;
1926 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; 1932 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen;
1927 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; 1933 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds;
1928 stats.totalPixelsPainted += software_stats_.totalPixelsPainted; 1934 stats.totalPixelsPainted += software_stats_.totalPixelsPainted;
1929 stats.totalRasterizeTimeInSeconds += 1935 stats.totalRasterizeTimeInSeconds +=
1930 software_stats_.totalRasterizeTimeInSeconds; 1936 software_stats_.totalRasterizeTimeInSeconds;
1931 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized; 1937 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized;
1932 } 1938 }
1933 1939
1934 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { 1940 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const {
(...skipping 30 matching lines...) Expand all
1965 bool RenderWidget::WillHandleGestureEvent( 1971 bool RenderWidget::WillHandleGestureEvent(
1966 const WebKit::WebGestureEvent& event) { 1972 const WebKit::WebGestureEvent& event) {
1967 return false; 1973 return false;
1968 } 1974 }
1969 1975
1970 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1976 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1971 return false; 1977 return false;
1972 } 1978 }
1973 1979
1974 } // namespace content 1980 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698