diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 22:36:51 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-27 22:36:51 +0000 |
commit | 770a9d9bf0ec27aa387851e3b6b185b42033e1ba (patch) | |
tree | bf6673afdd0cbfcddaf4ef09e635a4ca4a2bdf13 /content/common/gpu | |
parent | 18e53d470f3245c3cc8d5315db0c569804b6de79 (diff) | |
download | chromium_src-770a9d9bf0ec27aa387851e3b6b185b42033e1ba.zip chromium_src-770a9d9bf0ec27aa387851e3b6b185b42033e1ba.tar.gz chromium_src-770a9d9bf0ec27aa387851e3b6b185b42033e1ba.tar.bz2 |
Fix broken RAF on Mac due to early Echo reply message.
BUG=98284
TEST=verify simple WebGL content runs at smooth 60fps on mac.
Review URL: http://codereview.chromium.org/8055023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu')
-rw-r--r-- | content/common/gpu/gpu_channel.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index e883909..3434c74 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -70,8 +70,10 @@ bool GpuChannel::OnMessageReceived(const IPC::Message& message) { } // Control messages are not deferred and can be handled out of order with - // respect to routed ones. - if (message.routing_id() == MSG_ROUTING_CONTROL) + // respect to routed ones. Except for Echo, which must be deferred in order + // to respect the asynchronous Mac SwapBuffers. + if (message.routing_id() == MSG_ROUTING_CONTROL && + message.type() != GpuChannelMsg_Echo::ID) return OnControlMessageReceived(message); // If the channel is unscheduled, defer sync and async messages until it is @@ -83,6 +85,10 @@ bool GpuChannel::OnMessageReceived(const IPC::Message& message) { return true; } + // Handle deferred control messages. + if (message.routing_id() == MSG_ROUTING_CONTROL) + return OnControlMessageReceived(message); + if (!router_.RouteMessage(message)) { // Respond to sync messages even if router failed to route. if (message.is_sync()) { |