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

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: Fix buidl.gn 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
« no previous file with comments | « gpu/ipc/client/DEPS ('k') | gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
piman 2016/05/10 22:24:16 This is called in the renderer - e.g. for pepper.
ccameron 2016/05/11 06:23:01 Good point -- moved the #if MAC parts into GpuProc
+#endif
+ task_runner->PostTask(
FROM_HERE,
base::Bind(base::IgnoreResult(&IPC::Listener::OnMessageReceived),
info.listener, message));
« no previous file with comments | « gpu/ipc/client/DEPS ('k') | gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698