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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 16285005: Don't track whether a resize ack is pending during layout tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 6 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/browser/renderer_host/render_widget_host_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index e8659f3d409ce26b4354ef1072667ef0610abfff..1d8a92cf5d9a66600b92e0e65b0cb97dd4e85998 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -85,6 +85,8 @@ using WebKit::WebTextDirection;
namespace content {
namespace {
+bool g_check_for_pending_resize_ack = true;
+
// How long to (synchronously) wait for the renderer to respond with a
// PaintRect message, when our backing-store is invalid, before giving up and
// returning a null or incorrectly sized backing-store from GetBackingStore.
@@ -1215,6 +1217,11 @@ int64 RenderWidgetHostImpl::GetLatencyComponentId() {
return GetRoutingID() | (static_cast<int64>(GetProcess()->GetID()) << 32);
}
+// static
+void RenderWidgetHostImpl::DisableResizeAckCheckForTesting() {
+ g_check_for_pending_resize_ack = false;
+}
+
ui::LatencyInfo RenderWidgetHostImpl::NewInputLatencyInfo() {
ui::LatencyInfo info;
info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_COMPONENT,
@@ -1737,7 +1744,7 @@ void RenderWidgetHostImpl::OnUpdateRect(
// resize_ack_pending_ needs to be cleared before we call DidPaintRect, since
// that will end up reaching GetBackingStore.
if (is_resize_ack) {
- DCHECK(resize_ack_pending_);
+ DCHECK(!g_check_for_pending_resize_ack || resize_ack_pending_);
resize_ack_pending_ = false;
in_flight_size_.SetSize(0, 0);
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698