Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: media/gpu/ipc/service/media_gpu_channel.cc

Issue 2923933004: [NotForReview] Move GJDAH and GJDA to media/gpu/mojo
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel.h ('k') | media/gpu/mojo/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/ipc/service/media_gpu_channel.cc
diff --git a/media/gpu/ipc/service/media_gpu_channel.cc b/media/gpu/ipc/service/media_gpu_channel.cc
index 1832325164e0d2d519895c83b9903e38942288a5..7dd8a7873b61a03f7756149a8ba476ac39ea58de 100644
--- a/media/gpu/ipc/service/media_gpu_channel.cc
+++ b/media/gpu/ipc/service/media_gpu_channel.cc
@@ -104,49 +104,11 @@ bool MediaGpuChannel::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_FORWARD_DELAY_REPLY(
GpuCommandBufferMsg_CreateVideoEncoder, &helper,
MediaGpuChannelDispatchHelper::OnCreateVideoEncoder)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuChannelMsg_CreateJpegDecoder,
- OnCreateJpegDecoder)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
-namespace {
-
-void SendCreateJpegDecoderResult(
- std::unique_ptr<IPC::Message> reply_message,
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- base::WeakPtr<IPC::Sender> channel,
- scoped_refptr<MediaGpuChannelFilter> filter,
- bool result) {
- GpuChannelMsg_CreateJpegDecoder::WriteReplyParams(reply_message.get(),
- result);
- if (io_task_runner->BelongsToCurrentThread()) {
- filter->Send(reply_message.release());
- } else if (channel) {
- channel->Send(reply_message.release());
- }
-}
-
-} // namespace
-
-void MediaGpuChannel::OnCreateJpegDecoder(int32_t route_id,
- IPC::Message* reply_msg) {
- std::unique_ptr<IPC::Message> msg(reply_msg);
- if (!jpeg_decoder_) {
- // The lifetime of |jpeg_decoder_| is managed by a gpu::GpuChannel. The
- // GpuChannels destroy all the GpuJpegDecodeAccelerator that they own when
- // they are destroyed. Therefore, passing |channel_| as a raw pointer is
- // safe.
- jpeg_decoder_.reset(
- new GpuJpegDecodeAccelerator(channel_, channel_->io_task_runner()));
- }
- jpeg_decoder_->AddClient(
- route_id,
- base::Bind(&SendCreateJpegDecoderResult, base::Passed(&msg),
- channel_->io_task_runner(), channel_->AsWeakPtr(), filter_));
-}
-
void MediaGpuChannel::OnCreateVideoDecoder(
int32_t command_buffer_route_id,
const VideoDecodeAccelerator::Config& config,
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel.h ('k') | media/gpu/mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698