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

Side by Side Diff: content/renderer/render_widget.cc

Issue 10982078: Adding hooks for gathering total pixels painted and rasterized stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 break; 1864 break;
1865 } 1865 }
1866 } 1866 }
1867 } 1867 }
1868 1868
1869 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { 1869 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const {
1870 webwidget()->renderingStats(stats); 1870 webwidget()->renderingStats(stats);
1871 stats.numAnimationFrames += software_stats_.numAnimationFrames; 1871 stats.numAnimationFrames += software_stats_.numAnimationFrames;
1872 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; 1872 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen;
1873 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; 1873 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds;
1874 stats.totalPixelsPainted += software_stats_.totalPixelsPainted;
1875 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized;
1874 } 1876 }
1875 1877
1876 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const { 1878 bool RenderWidget::GetGpuRenderingStats(GpuRenderingStats* stats) const {
1877 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); 1879 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel();
1878 if (!gpu_channel) 1880 if (!gpu_channel)
1879 return false; 1881 return false;
1880 1882
1881 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); 1883 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats);
1882 } 1884 }
1883 1885
(...skipping 18 matching lines...) Expand all
1902 1904
1903 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1905 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1904 return false; 1906 return false;
1905 } 1907 }
1906 1908
1907 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1909 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1908 return false; 1910 return false;
1909 } 1911 }
1910 1912
1911 } // namespace content 1913 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698