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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 } | 1885 } |
1886 } | 1886 } |
1887 | 1887 |
1888 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { | 1888 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { |
1889 webwidget()->renderingStats(stats); | 1889 webwidget()->renderingStats(stats); |
1890 stats.numAnimationFrames += software_stats_.numAnimationFrames; | 1890 stats.numAnimationFrames += software_stats_.numAnimationFrames; |
1891 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; | 1891 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; |
1892 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; | 1892 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; |
1893 } | 1893 } |
1894 | 1894 |
| 1895 void RenderWidget::StopRecordingRenderingStats( |
| 1896 WebKit::WebRenderingStats& stats) const { |
| 1897 stats.numAnimationFrames += software_stats_.numAnimationFrames; |
| 1898 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; |
| 1899 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; |
| 1900 } |
| 1901 |
1895 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { | 1902 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { |
1896 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); | 1903 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); |
1897 if (!gpu_channel) | 1904 if (!gpu_channel) |
1898 return false; | 1905 return false; |
1899 | 1906 |
1900 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); | 1907 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); |
1901 } | 1908 } |
1902 | 1909 |
1903 void RenderWidget::BeginSmoothScroll( | 1910 void RenderWidget::BeginSmoothScroll( |
1904 bool down, | 1911 bool down, |
(...skipping 16 matching lines...) Expand all Loading... |
1921 | 1928 |
1922 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1929 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1923 return false; | 1930 return false; |
1924 } | 1931 } |
1925 | 1932 |
1926 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1933 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1927 return false; | 1934 return false; |
1928 } | 1935 } |
1929 | 1936 |
1930 } // namespace content | 1937 } // namespace content |
OLD | NEW |