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