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

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: Initial commit. 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
« content/renderer/render_widget.h ('K') | « 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..959cd1e15d0be4095bda1d552fbd035394509a11 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),
+ total_do_deferred_update_count_(0),
screen_info_(screen_info),
device_scale_factor_(1) {
if (!swapped_out)
@@ -889,6 +891,8 @@ void RenderWidget::DoDeferredUpdate() {
}
last_do_deferred_update_time_ = frame_begin_ticks;
+ total_do_deferred_update_count_++;
nduca 2012/07/25 17:14:04 name is a bit awkward. Look in the .h for things t
dtu 2012/07/27 01:40:48 Just changed to deferred_update_count_. Hopefully
+
// 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 +1773,15 @@ void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
}
}
+void RenderWidget::GetRenderingStats(WebKit::WebRenderingStats& stats) const {
+ if (is_accelerated_compositing_active_) {
nduca 2012/07/25 17:14:04 if (is ...) { get return } ... unindented soft
dtu 2012/07/27 01:40:48 Done. With the way the stats are calculated now, t
+ webwidget()->renderingStats(stats);
+ } else {
+ stats.numAnimationFrames = total_do_deferred_update_count_;
+ stats.numFramesSentToScreen = total_do_deferred_update_count_;
+ }
+}
+
void RenderWidget::BeginSmoothScroll(bool down, bool scroll_far) {
Send(new ViewHostMsg_BeginSmoothScroll(routing_id_, down, scroll_far));
}
« content/renderer/render_widget.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698