OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/ipc/service/gpu_channel.h" | 5 #include "gpu/ipc/service/gpu_channel.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 GpuCommandBufferStub* stub = stubs_.get(routing_id); | 785 GpuCommandBufferStub* stub = stubs_.get(routing_id); |
786 | 786 |
787 DCHECK(!stub || stub->IsScheduled()); | 787 DCHECK(!stub || stub->IsScheduled()); |
788 | 788 |
789 DVLOG(1) << "received message @" << &msg << " on channel @" << this | 789 DVLOG(1) << "received message @" << &msg << " on channel @" << this |
790 << " with type " << msg.type(); | 790 << " with type " << msg.type(); |
791 | 791 |
792 HandleMessageHelper(msg); | 792 HandleMessageHelper(msg); |
793 | 793 |
794 // If we get descheduled or yield while processing a message. | 794 // If we get descheduled or yield while processing a message. |
795 if (stub && stub->HasUnprocessedCommands()) { | 795 if ((stub && stub->HasUnprocessedCommands()) || |
796 DCHECK_EQ((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID, msg.type()); | 796 !message_queue->IsScheduled()) { |
| 797 DCHECK((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID == msg.type() || |
| 798 (uint32_t)GpuCommandBufferMsg_WaitSyncToken::ID == msg.type()); |
797 message_queue->PauseMessageProcessing(); | 799 message_queue->PauseMessageProcessing(); |
798 } else { | 800 } else { |
799 message_queue->FinishMessageProcessing(); | 801 message_queue->FinishMessageProcessing(); |
800 } | 802 } |
801 } | 803 } |
802 | 804 |
803 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { | 805 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { |
804 int32_t routing_id = msg.routing_id(); | 806 int32_t routing_id = msg.routing_id(); |
805 | 807 |
806 bool handled = false; | 808 bool handled = false; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 ->CreateImageForGpuMemoryBuffer(handle, | 1051 ->CreateImageForGpuMemoryBuffer(handle, |
1050 size, | 1052 size, |
1051 format, | 1053 format, |
1052 internalformat, | 1054 internalformat, |
1053 client_id_); | 1055 client_id_); |
1054 } | 1056 } |
1055 } | 1057 } |
1056 } | 1058 } |
1057 | 1059 |
1058 } // namespace gpu | 1060 } // namespace gpu |
OLD | NEW |