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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 1124423008: MJPEG acceleration for video capture using VAAPI, the GPU and IPC part (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-1-media
Patch Set: gpu_jpeg_decode_accelerator.cc filter to dispatch decode task Created 5 years, 7 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
Index: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 2768eea2f41d3968ab8aec97ce446c4204ddcfca..127cc94440c27bbe390394fa9a7dd0ea24e7167f 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -666,6 +666,8 @@ bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
OnCreateOffscreenCommandBuffer)
IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer,
OnDestroyCommandBuffer)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuMsg_CreateJpegDecoder,
+ OnCreateJpegDecoder)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
DCHECK(handled) << msg.type();
@@ -787,6 +789,21 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
}
}
+void GpuChannel::OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg) {
+ if (!jpeg_decoder_) {
+ jpeg_decoder_.reset(new GpuJpegDecodeAccelerator(this, io_task_runner_));
+ }
+ jpeg_decoder_->AddClient(route_id, reply_msg);
+}
+
+#if 0
+void GpuChannel::ReleaseJpegDecoder(int32 route_id) {
+ jpeg_decoder_.reset();
+ DCHECK(jpeg_decoder_map_.get(route_id));
+ jpeg_decoder_map_.erase(route_id);
+}
+#endif
piman 2015/05/26 23:31:53 nit: remove
kcwu 2015/05/27 14:13:23 Done.
+
void GpuChannel::MessageProcessed() {
messages_processed_++;
if (preempting_flag_.get()) {

Powered by Google App Engine
This is Rietveld 408576698