| 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 !message_queue->IsScheduled()) { | 796 DCHECK_EQ((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID, msg.type()); |
| 797 DCHECK((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID == msg.type() || | |
| 798 (uint32_t)GpuCommandBufferMsg_WaitSyncToken::ID == msg.type()); | |
| 799 message_queue->PauseMessageProcessing(); | 797 message_queue->PauseMessageProcessing(); |
| 800 } else { | 798 } else { |
| 801 message_queue->FinishMessageProcessing(); | 799 message_queue->FinishMessageProcessing(); |
| 802 } | 800 } |
| 803 } | 801 } |
| 804 | 802 |
| 805 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { | 803 void GpuChannel::HandleMessageHelper(const IPC::Message& msg) { |
| 806 int32_t routing_id = msg.routing_id(); | 804 int32_t routing_id = msg.routing_id(); |
| 807 | 805 |
| 808 bool handled = false; | 806 bool handled = false; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 ->CreateImageForGpuMemoryBuffer(handle, | 1067 ->CreateImageForGpuMemoryBuffer(handle, |
| 1070 size, | 1068 size, |
| 1071 format, | 1069 format, |
| 1072 internalformat, | 1070 internalformat, |
| 1073 client_id_); | 1071 client_id_); |
| 1074 } | 1072 } |
| 1075 } | 1073 } |
| 1076 } | 1074 } |
| 1077 | 1075 |
| 1078 } // namespace gpu | 1076 } // namespace gpu |
| OLD | NEW |