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 (!message_queue->IsScheduled()) { |
796 DCHECK_EQ((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID, msg.type()); | 796 DCHECK((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID == msg.type() || |
| 797 (uint32_t)GpuCommandBufferMsg_WaitSyncToken::ID == msg.type()); |
797 message_queue->PauseMessageProcessing(); | 798 message_queue->PauseMessageProcessing(); |
798 } else { | 799 } else { |
799 message_queue->FinishMessageProcessing(); | 800 message_queue->FinishMessageProcessing(); |
800 } | 801 } |
801 } | 802 } |
802 | 803 |
803 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { | 804 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { |
804 int32_t routing_id = msg.routing_id(); | 805 int32_t routing_id = msg.routing_id(); |
805 | 806 |
806 bool handled = false; | 807 bool handled = false; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 ->CreateImageForGpuMemoryBuffer(handle, | 1050 ->CreateImageForGpuMemoryBuffer(handle, |
1050 size, | 1051 size, |
1051 format, | 1052 format, |
1052 internalformat, | 1053 internalformat, |
1053 client_id_); | 1054 client_id_); |
1054 } | 1055 } |
1055 } | 1056 } |
1056 } | 1057 } |
1057 | 1058 |
1058 } // namespace gpu | 1059 } // namespace gpu |
OLD | NEW |