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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 break; | 1856 break; |
1857 } | 1857 } |
1858 } | 1858 } |
1859 } | 1859 } |
1860 | 1860 |
1861 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { | 1861 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { |
1862 webwidget()->renderingStats(stats); | 1862 webwidget()->renderingStats(stats); |
1863 stats.numAnimationFrames += software_stats_.numAnimationFrames; | 1863 stats.numAnimationFrames += software_stats_.numAnimationFrames; |
1864 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; | 1864 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; |
1865 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; | 1865 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; |
| 1866 stats.totalPixelsPainted += software_stats_.totalPixelsPainted; |
| 1867 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized; |
1866 } | 1868 } |
1867 | 1869 |
1868 bool RenderWidget::GetGpuRenderingStats( | 1870 bool RenderWidget::GetGpuRenderingStats( |
1869 content::GpuRenderingStats* stats) const { | 1871 content::GpuRenderingStats* stats) const { |
1870 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); | 1872 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); |
1871 if (!gpu_channel) | 1873 if (!gpu_channel) |
1872 return false; | 1874 return false; |
1873 | 1875 |
1874 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); | 1876 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); |
1875 } | 1877 } |
1876 | 1878 |
1877 void RenderWidget::BeginSmoothScroll( | 1879 void RenderWidget::BeginSmoothScroll( |
1878 bool down, | 1880 bool down, |
1879 bool scroll_far, | 1881 bool scroll_far, |
1880 const SmoothScrollCompletionCallback& callback) { | 1882 const SmoothScrollCompletionCallback& callback) { |
1881 DCHECK(!callback.is_null()); | 1883 DCHECK(!callback.is_null()); |
1882 int id = next_smooth_scroll_gesture_id_++; | 1884 int id = next_smooth_scroll_gesture_id_++; |
1883 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, id, down, scroll_far)); | 1885 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, id, down, scroll_far)); |
1884 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); | 1886 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); |
1885 } | 1887 } |
1886 | 1888 |
1887 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1889 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1888 return false; | 1890 return false; |
1889 } | 1891 } |
1890 | 1892 |
1891 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1893 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1892 return false; | 1894 return false; |
1893 } | 1895 } |
OLD | NEW |