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

Unified Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 1963263002: Fix Mac resize, delete more Mac code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
Index: gpu/ipc/client/gpu_channel_host.cc
diff --git a/gpu/ipc/client/gpu_channel_host.cc b/gpu/ipc/client/gpu_channel_host.cc
index be6a3f79d6c16c9d500f10e50735ad7694d09a6a..7fa0b92f9dc345cb84b9371f6d9e034df8479f41 100644
--- a/gpu/ipc/client/gpu_channel_host.cc
+++ b/gpu/ipc/client/gpu_channel_host.cc
@@ -24,6 +24,10 @@
#include "ipc/ipc_sync_message_filter.h"
#include "url/gurl.h"
+#if defined(OS_MACOSX)
+#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
+#endif
+
using base::AutoLock;
namespace gpu {
@@ -446,7 +450,15 @@ bool GpuChannelHost::MessageFilter::OnMessageReceived(
return false;
const ListenerInfo& info = it->second;
- info.task_runner->PostTask(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner = info.task_runner;
+#if defined(OS_MACOSX)
+ // On Mac, the IPCs ViewHostMsg_SwapCompositorFrame, ViewHostMsg_UpdateRect,
+ // and GpuCommandBufferMsg_SwapBuffersCompleted need to be handled in a
+ // nested message loop during resize.
+ if (message.type() == GpuCommandBufferMsg_SwapBuffersCompleted::ID)
+ task_runner = ui::WindowResizeHelperMac::Get()->task_runner();
+#endif
+ task_runner->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&IPC::Listener::OnMessageReceived),
info.listener, message));

Powered by Google App Engine
This is Rietveld 408576698