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

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"
(...skipping 22 matching lines...) Expand all
33 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" 33 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
34 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 34 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
35 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 35 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
36 #include "third_party/skia/include/core/SkShader.h" 36 #include "third_party/skia/include/core/SkShader.h"
37 #include "ui/base/ui_base_switches.h" 37 #include "ui/base/ui_base_switches.h"
38 #include "ui/gfx/rect_conversions.h" 38 #include "ui/gfx/rect_conversions.h"
39 #include "ui/gfx/size_conversions.h" 39 #include "ui/gfx/size_conversions.h"
40 #include "ui/gfx/skia_util.h" 40 #include "ui/gfx/skia_util.h"
41 #include "ui/gl/gl_switches.h" 41 #include "ui/gl/gl_switches.h"
42 #include "ui/surface/transport_dib.h" 42 #include "ui/surface/transport_dib.h"
43 #include "webkit/compositor_bindings/web_rendering_stats_impl.h"
43 #include "webkit/glue/webkit_glue.h" 44 #include "webkit/glue/webkit_glue.h"
44 #include "webkit/plugins/npapi/webplugin.h" 45 #include "webkit/plugins/npapi/webplugin.h"
45 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 46 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
46 47
47 #if defined(OS_POSIX) 48 #if defined(OS_POSIX)
48 #include "ipc/ipc_channel_posix.h" 49 #include "ipc/ipc_channel_posix.h"
49 #include "third_party/skia/include/core/SkMallocPixelRef.h" 50 #include "third_party/skia/include/core/SkMallocPixelRef.h"
50 #include "third_party/skia/include/core/SkPixelRef.h" 51 #include "third_party/skia/include/core/SkPixelRef.h"
51 #endif // defined(OS_POSIX) 52 #endif // defined(OS_POSIX)
52 53
(...skipping 1860 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
1923 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { 1924 void RenderWidget::GetRenderingStats(
1925 WebKit::WebRenderingStatsImpl& stats) const {
1924 webwidget()->renderingStats(stats); 1926 webwidget()->renderingStats(stats);
1925 stats.numAnimationFrames += software_stats_.numAnimationFrames; 1927
1926 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; 1928 stats.rendering_stats.numAnimationFrames +=
1927 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; 1929 software_stats_.numAnimationFrames;
1928 stats.totalPixelsPainted += software_stats_.totalPixelsPainted; 1930 stats.rendering_stats.numFramesSentToScreen +=
1929 stats.totalRasterizeTimeInSeconds += 1931 software_stats_.numFramesSentToScreen;
1932 stats.rendering_stats.totalPaintTimeInSeconds +=
1933 software_stats_.totalPaintTimeInSeconds;
1934 stats.rendering_stats.totalPixelsPainted +=
1935 software_stats_.totalPixelsPainted;
1936 stats.rendering_stats.totalRasterizeTimeInSeconds +=
1930 software_stats_.totalRasterizeTimeInSeconds; 1937 software_stats_.totalRasterizeTimeInSeconds;
1931 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized; 1938 stats.rendering_stats.totalPixelsRasterized +=
1939 software_stats_.totalPixelsRasterized;
1932 } 1940 }
1933 1941
1934 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { 1942 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const {
1935 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); 1943 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel();
1936 if (!gpu_channel) 1944 if (!gpu_channel)
1937 return false; 1945 return false;
1938 1946
1939 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); 1947 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats);
1940 } 1948 }
1941 1949
(...skipping 23 matching lines...) Expand all
1965 bool RenderWidget::WillHandleGestureEvent( 1973 bool RenderWidget::WillHandleGestureEvent(
1966 const WebKit::WebGestureEvent& event) { 1974 const WebKit::WebGestureEvent& event) {
1967 return false; 1975 return false;
1968 } 1976 }
1969 1977
1970 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1978 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1971 return false; 1979 return false;
1972 } 1980 }
1973 1981
1974 } // namespace content 1982 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | webkit/compositor_bindings/web_layer_tree_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698