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

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

Issue 1016773002: MJPEG acceleration for video capture using VAAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix coded size, shm handle Created 5 years, 9 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 c12c762c6004f725973182513535274cc6ac2cc7..c6d1c18703ff43dfe3d18c8733687cf83f666425 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -21,6 +21,7 @@
#include "content/common/gpu/gpu_channel_manager.h"
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/common/value_state.h"
@@ -667,11 +668,14 @@ void GpuChannel::OnDestroy() {
bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
bool handled = true;
+ LOG(ERROR) << __func__ << ", type=" << msg.type();
+
IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg)
IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateOffscreenCommandBuffer,
OnCreateOffscreenCommandBuffer)
IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer,
OnDestroyCommandBuffer)
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateJpegDecoder, OnCreateJpegDecoder)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
DCHECK(handled) << msg.type();
@@ -793,6 +797,16 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
}
}
+void GpuChannel::OnCreateJpegDecoder(int32 route_id, bool* succeeded) {
+ LOG(ERROR) << "GpuChannel::OnCreateJpegDecoder";
+ GpuJpegDecodeAccelerator* decoder = new GpuJpegDecodeAccelerator(
+ this,
+ route_id, io_message_loop_);
+ (void)decoder; // it will delete itself??
wuchengli 2015/03/23 06:30:14 No. I think you need some kind of DestructionObser
kcwu 2015/03/30 18:12:14 Done.
+
+ *succeeded = decoder->Initialize();
+}
+
void GpuChannel::MessageProcessed() {
messages_processed_++;
if (preempting_flag_.get()) {

Powered by Google App Engine
This is Rietveld 408576698