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 "content/common/gpu/gpu_channel.h" | 5 #include "content/common/gpu/gpu_channel.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
799 gpu_channel_manager_->RemoveChannel(client_id_); | 799 gpu_channel_manager_->RemoveChannel(client_id_); |
800 } | 800 } |
801 | 801 |
802 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { | 802 bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { |
803 bool handled = true; | 803 bool handled = true; |
804 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) | 804 IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg) |
805 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer, | 805 IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer, |
806 OnCreateOffscreenCommandBuffer) | 806 OnCreateOffscreenCommandBuffer) |
807 IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer, | 807 IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer, |
808 OnDestroyCommandBuffer) | 808 OnDestroyCommandBuffer) |
809 IPC_MESSAGE_HANDLER(GpuChannelMsg_Nop, | |
810 OnNop) | |
piman
2015/09/26 00:09:51
You want to handle this on the IO thread (in the f
David Yen
2015/09/28 17:38:18
Done.
| |
809 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuMsg_CreateJpegDecoder, | 811 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuMsg_CreateJpegDecoder, |
810 OnCreateJpegDecoder) | 812 OnCreateJpegDecoder) |
811 IPC_MESSAGE_UNHANDLED(handled = false) | 813 IPC_MESSAGE_UNHANDLED(handled = false) |
812 IPC_END_MESSAGE_MAP() | 814 IPC_END_MESSAGE_MAP() |
813 DCHECK(handled) << msg.type(); | 815 DCHECK(handled) << msg.type(); |
814 return handled; | 816 return handled; |
815 } | 817 } |
816 | 818 |
817 scoped_refptr<gpu::SyncPointClientState> GpuChannel::GetSyncPointClientState() { | 819 scoped_refptr<gpu::SyncPointClientState> GpuChannel::GetSyncPointClientState() { |
818 return message_queue_->GetSyncPointClientState(); | 820 return message_queue_->GetSyncPointClientState(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1014 } | 1016 } |
1015 } | 1017 } |
1016 | 1018 |
1017 void GpuChannel::OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg) { | 1019 void GpuChannel::OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg) { |
1018 if (!jpeg_decoder_) { | 1020 if (!jpeg_decoder_) { |
1019 jpeg_decoder_.reset(new GpuJpegDecodeAccelerator(this, io_task_runner_)); | 1021 jpeg_decoder_.reset(new GpuJpegDecodeAccelerator(this, io_task_runner_)); |
1020 } | 1022 } |
1021 jpeg_decoder_->AddClient(route_id, reply_msg); | 1023 jpeg_decoder_->AddClient(route_id, reply_msg); |
1022 } | 1024 } |
1023 | 1025 |
1026 void GpuChannel::OnNop() {} | |
1027 | |
1024 void GpuChannel::CacheShader(const std::string& key, | 1028 void GpuChannel::CacheShader(const std::string& key, |
1025 const std::string& shader) { | 1029 const std::string& shader) { |
1026 gpu_channel_manager_->Send( | 1030 gpu_channel_manager_->Send( |
1027 new GpuHostMsg_CacheShader(client_id_, key, shader)); | 1031 new GpuHostMsg_CacheShader(client_id_, key, shader)); |
1028 } | 1032 } |
1029 | 1033 |
1030 void GpuChannel::AddFilter(IPC::MessageFilter* filter) { | 1034 void GpuChannel::AddFilter(IPC::MessageFilter* filter) { |
1031 io_task_runner_->PostTask( | 1035 io_task_runner_->PostTask( |
1032 FROM_HERE, base::Bind(&GpuChannelMessageFilter::AddChannelFilter, | 1036 FROM_HERE, base::Bind(&GpuChannelMessageFilter::AddChannelFilter, |
1033 filter_, make_scoped_refptr(filter))); | 1037 filter_, make_scoped_refptr(filter))); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1084 } | 1088 } |
1085 } | 1089 } |
1086 } | 1090 } |
1087 | 1091 |
1088 void GpuChannel::HandleUpdateValueState( | 1092 void GpuChannel::HandleUpdateValueState( |
1089 unsigned int target, const gpu::ValueState& state) { | 1093 unsigned int target, const gpu::ValueState& state) { |
1090 pending_valuebuffer_state_->UpdateState(target, state); | 1094 pending_valuebuffer_state_->UpdateState(target, state); |
1091 } | 1095 } |
1092 | 1096 |
1093 } // namespace content | 1097 } // namespace content |
OLD | NEW |