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)); |
} |