summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/renderer_host/render_message_filter.cc14
-rw-r--r--content/browser/renderer_host/render_message_filter.h1
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc11
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.h4
-rw-r--r--content/common/swapped_out_messages.cc1
-rw-r--r--content/common/view_messages.h4
-rw-r--r--content/renderer/render_widget.cc15
7 files changed, 1 insertions, 49 deletions
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index e686ce8..a47d71a 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -435,7 +435,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
#endif
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_UpdateRect,
render_widget_helper_->DidReceiveBackingStoreMsg(message))
- IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_CheckPermission,
OnCheckNotificationPermission)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
@@ -1138,19 +1137,6 @@ void RenderMessageFilter::OnCompletedOpenChannelToNpapiPlugin(
plugin_host_clients_.erase(client);
}
-void RenderMessageFilter::OnUpdateIsDelayed(const IPC::Message& msg) {
- // When not in accelerated compositing mode, in certain cases (e.g. waiting
- // for a resize or if no backing store) the RenderWidgetHost is blocking the
- // UI thread for some time, waiting for an UpdateRect from the renderer. If we
- // are going to switch to accelerated compositing, the GPU process may need
- // round-trips to the UI thread before finishing the frame, causing deadlocks
- // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So
- // the renderer sent us this message, so that we can unblock the UI thread.
- // We will simply re-use the UpdateRect unblock mechanism, just with a
- // different message.
- render_widget_helper_->DidReceiveBackingStoreMsg(msg);
-}
-
void RenderMessageFilter::OnAre3DAPIsBlocked(int render_view_id,
const GURL& top_origin_url,
ThreeDAPIType requester,
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index 2fa211c..2814a04 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -260,7 +260,6 @@ class RenderMessageFilter : public BrowserMessageFilter {
void OnCompletedOpenChannelToNpapiPlugin(
OpenChannelToNpapiPluginCallback* client);
- void OnUpdateIsDelayed(const IPC::Message& msg);
void OnAre3DAPIsBlocked(int render_view_id,
const GURL& top_origin_url,
ThreeDAPIType requester,
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index f01a2e7..d2b4aea1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -183,7 +183,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
is_unresponsive_(false),
in_flight_event_count_(0),
in_get_backing_store_(false),
- abort_get_backing_store_(false),
view_being_painted_(false),
ignore_input_events_(false),
input_method_active_(false),
@@ -467,7 +466,6 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
msg_is_ok = OnSwapCompositorFrame(msg))
IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
- IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed)
IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus)
IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnBlur)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
@@ -828,10 +826,8 @@ void RenderWidgetHostImpl::WaitForSurface() {
// Break now if we got a backing store or accelerated surface of the
// correct size.
- if (view_->HasAcceleratedSurface(view_size) || abort_get_backing_store_) {
- abort_get_backing_store_ = false;
+ if (view_->HasAcceleratedSurface(view_size))
return;
- }
} else {
TRACE_EVENT0("renderer_host", "WaitForSurface::Timeout");
break;
@@ -1574,11 +1570,6 @@ void RenderWidgetHostImpl::OnUpdateRect(
UMA_HISTOGRAM_TIMES("MPArch.RWH_OnMsgUpdateRect", delta);
}
-void RenderWidgetHostImpl::OnUpdateIsDelayed() {
- if (in_get_backing_store_)
- abort_get_backing_store_ = true;
-}
-
void RenderWidgetHostImpl::DidUpdateBackingStore(
const ViewHostMsg_UpdateRect_Params& params,
const TimeTicks& paint_start) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 139ea3b..ab43bae 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -637,7 +637,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
bool OnSwapCompositorFrame(const IPC::Message& message);
void OnFlingingStopped();
void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
- void OnUpdateIsDelayed();
void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet);
virtual void OnFocus();
virtual void OnBlur();
@@ -820,9 +819,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Flag to detect recursive calls to GetBackingStore().
bool in_get_backing_store_;
- // Flag to trigger the GetBackingStore method to abort early.
- bool abort_get_backing_store_;
-
// Set when we call DidPaintRect/DidScrollRect on the view.
bool view_being_painted_;
diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc
index be0fe8a..a39de35 100644
--- a/content/common/swapped_out_messages.cc
+++ b/content/common/swapped_out_messages.cc
@@ -27,7 +27,6 @@ bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
case ViewHostMsg_RenderProcessGone::ID:
case ViewHostMsg_ClosePage_ACK::ID:
case ViewHostMsg_SwapCompositorFrame::ID:
- case ViewHostMsg_UpdateIsDelayed::ID:
case ViewHostMsg_DidActivateAcceleratedCompositing::ID:
// Handled by WorkerMessageFilter (or by SharedWorkerMessageFilter when
// embedded-shared-worker is enabled).
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 46d4343..006cdd1 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -1165,10 +1165,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
ViewHostMsg_UpdateRect_Params)
-// Sent to unblock the browser's UI thread if it is waiting on an UpdateRect,
-// which may get delayed until the browser's UI unblocks.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateIsDelayed)
-
// Sent by the renderer when accelerated compositing is enabled or disabled to
// notify the browser whether or not is should do painting.
IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index c9747a9..18c97d7 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1236,21 +1236,6 @@ void RenderWidget::AutoResizeCompositor() {
void RenderWidget::didActivateCompositor() {
TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
-#if !defined(OS_MACOSX)
- if (!is_accelerated_compositing_active_) {
- // When not in accelerated compositing mode, in certain cases (e.g. waiting
- // for a resize or if no backing store) the RenderWidgetHost is blocking the
- // browser's UI thread for some time, waiting for an UpdateRect. If we are
- // going to switch to accelerated compositing, the GPU process may need
- // round-trips to the browser's UI thread before finishing the frame,
- // causing deadlocks if we delay the UpdateRect until we receive the
- // OnSwapBuffersComplete. So send a dummy message that will unblock the
- // browser's UI thread. This is not necessary on Mac, because SwapBuffers
- // now unblocks GetBackingStore on Mac.
- Send(new ViewHostMsg_UpdateIsDelayed(routing_id_));
- }
-#endif
-
is_accelerated_compositing_active_ = true;
Send(new ViewHostMsg_DidActivateAcceleratedCompositing(
routing_id_, is_accelerated_compositing_active_));