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

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: Created 8 years, 2 months 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 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 break; 1859 break;
1860 } 1860 }
1861 } 1861 }
1862 } 1862 }
1863 1863
1864 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const { 1864 void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const {
1865 webwidget()->renderingStats(stats); 1865 webwidget()->renderingStats(stats);
1866 stats.numAnimationFrames += software_stats_.numAnimationFrames; 1866 stats.numAnimationFrames += software_stats_.numAnimationFrames;
1867 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen; 1867 stats.numFramesSentToScreen += software_stats_.numFramesSentToScreen;
1868 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds; 1868 stats.totalPaintTimeInSeconds += software_stats_.totalPaintTimeInSeconds;
1869 stats.totalPixelsPainted += software_stats_.totalPixelsPainted;
1870 stats.totalPixelsRasterized += software_stats_.totalPixelsRasterized;
1869 } 1871 }
1870 1872
1871 bool RenderWidget::GetGpuRenderingStats( 1873 bool RenderWidget::GetGpuRenderingStats(
1872 content::GpuRenderingStats* stats) const { 1874 content::GpuRenderingStats* stats) const {
1873 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); 1875 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel();
1874 if (!gpu_channel) 1876 if (!gpu_channel)
1875 return false; 1877 return false;
1876 1878
1877 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats); 1879 return gpu_channel->CollectRenderingStatsForSurface(surface_id(), stats);
1878 } 1880 }
(...skipping 11 matching lines...) Expand all
1890 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback)); 1892 pending_smooth_scroll_gestures_.insert(std::make_pair(id, callback));
1891 } 1893 }
1892 1894
1893 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1895 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1894 return false; 1896 return false;
1895 } 1897 }
1896 1898
1897 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1899 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1898 return false; 1900 return false;
1899 } 1901 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698