Chromium Code Reviews| 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 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1823 } | 1823 } |
| 1824 } | 1824 } |
| 1825 | 1825 |
| 1826 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { | 1826 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { |
| 1827 webwidget()->renderingStats(stats); | 1827 webwidget()->renderingStats(stats); |
| 1828 stats.numAnimationFrames += software_stats_.numAnimationFrames; | 1828 stats.numAnimationFrames += software_stats_.numAnimationFrames; |
| 1829 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; | 1829 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; |
| 1830 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; | 1830 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 bool RenderWidget::GetGpuRenderingStats( | |
| 1834 content::GpuRenderingStats* stats) const { | |
| 1835 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); | |
| 1836 if (!gpu_channel) | |
| 1837 return false; | |
| 1838 | |
| 1839 return gpu_channel->CollectRenderingStats(routing_id(), stats); | |
|
piman
2012/09/04 22:05:25
oh, mmh, this routing_id() is the routing id of th
| |
| 1840 } | |
| 1841 | |
| 1833 void RenderWidget::BeginSmoothScroll( | 1842 void RenderWidget::BeginSmoothScroll( |
| 1834 bool down, | 1843 bool down, |
| 1835 bool scroll_far, | 1844 bool scroll_far, |
| 1836 const SmoothScrollCompletionCallback& callback) { | 1845 const SmoothScrollCompletionCallback& callback) { |
| 1837 DCHECK(!callback.is_null()); | 1846 DCHECK(!callback.is_null()); |
| 1838 int id = next_smooth_scroll_gesture_id_++; | 1847 int id = next_smooth_scroll_gesture_id_++; |
| 1839 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, id, down, scroll_far)); | 1848 Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, id, down, scroll_far)); |
| 1840 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); | 1849 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); |
| 1841 } | 1850 } |
| 1842 | 1851 |
| 1843 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1852 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
| 1844 return false; | 1853 return false; |
| 1845 } | 1854 } |
| 1846 | 1855 |
| 1847 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1856 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 1848 return false; | 1857 return false; |
| 1849 } | 1858 } |
| OLD | NEW |