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

Unified Diff: content/renderer/render_widget.cc

Issue 10818038: Make GPU benchmarking numAnimationFrames and totalPaintTime work in software mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes per nduca comments. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 568647cdf911f884238ff208e80ec2dffc51cff9..a5640aa0deb0e91d72fa55968f51f9cfc9eb94b6 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -22,6 +22,7 @@
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
#include "ipc/ipc_sync_message.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHelperPlugin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPagePopup.h"
@@ -107,6 +108,7 @@ RenderWidget::RenderWidget(WebKit::WebPopupType popup_type,
is_accelerated_compositing_active_(false),
animation_update_pending_(false),
invalidation_task_posted_(false),
+ deferred_update_count_(0),
screen_info_(screen_info),
device_scale_factor_(1) {
if (!swapped_out)
@@ -889,6 +891,9 @@ void RenderWidget::DoDeferredUpdate() {
}
last_do_deferred_update_time_ = frame_begin_ticks;
+ if (!is_accelerated_compositing_active_)
+ deferred_update_count_++;
piman 2012/07/27 03:39:44 I'm not exactly sure what you're trying to count,
dtu 2012/07/31 01:35:00 Removed this.
+
// OK, save the pending update to a local since painting may cause more
// invalidation. Some WebCore rendering objects only layout when painted.
PaintAggregator::PendingUpdate update;
@@ -1769,6 +1774,12 @@ void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
}
}
+void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const {
+ webwidget()->renderingStats(stats);
+ stats.numAnimationFrames += deferred_update_count_;
+ stats.numFramesSentToScreen += deferred_update_count_;
+}
+
void RenderWidget::BeginSmoothScroll(bool down, bool scroll_far) {
Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far));
}
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698