OLD | NEW |
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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1913 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
1914 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1914 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
1915 i != plugin_window_moves_.end(); ++i) { | 1915 i != plugin_window_moves_.end(); ++i) { |
1916 if (i->window == window) { | 1916 if (i->window == window) { |
1917 plugin_window_moves_.erase(i); | 1917 plugin_window_moves_.erase(i); |
1918 break; | 1918 break; |
1919 } | 1919 } |
1920 } | 1920 } |
1921 } | 1921 } |
1922 | 1922 |
| 1923 #ifdef NOT_USING_WEB_RENDERING_STATS |
| 1924 void RenderWidget::GetRenderingStats(cc::RenderingStats& stats) const { |
| 1925 webwidget()->renderingStats(&stats); |
| 1926 #else |
1923 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { | 1927 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { |
1924 webwidget()->renderingStats(stats); | 1928 webwidget()->renderingStats(stats); |
| 1929 #endif // NOT_USING_WEB_RENDERING_STATS |
1925 stats.numAnimationFrames += software_stats_.numAnimationFrames; | 1930 stats.numAnimationFrames += software_stats_.numAnimationFrames; |
1926 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; | 1931 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; |
1927 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; | 1932 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; |
1928 stats.totalPixelsPainted += software_stats_.totalPixelsPainted; | 1933 stats.totalPixelsPainted += software_stats_.totalPixelsPainted; |
1929 stats.totalRasterizeTimeInSeconds += | 1934 stats.totalRasterizeTimeInSeconds += |
1930 software_stats_.totalRasterizeTimeInSeconds; | 1935 software_stats_.totalRasterizeTimeInSeconds; |
1931 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized; | 1936 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized; |
1932 } | 1937 } |
1933 | 1938 |
1934 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { | 1939 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { |
(...skipping 30 matching lines...) Expand all Loading... |
1965 bool RenderWidget::WillHandleGestureEvent( | 1970 bool RenderWidget::WillHandleGestureEvent( |
1966 const WebKit::WebGestureEvent& event) { | 1971 const WebKit::WebGestureEvent& event) { |
1967 return false; | 1972 return false; |
1968 } | 1973 } |
1969 | 1974 |
1970 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1975 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1971 return false; | 1976 return false; |
1972 } | 1977 } |
1973 | 1978 |
1974 } // namespace content | 1979 } // namespace content |
OLD | NEW |