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

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

Issue 7292010: Delete GpuVideoService and move GpuVideoDecodeAccelerator ownership to stubs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase ToT Created 9 years, 5 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 | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 0060831b811d904a93922317117547ae731d1a48..4fea458b048ad6b82c896fc14236ed16aabc33ee 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -93,6 +93,10 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
OnDestroyTransferBuffer);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetTransferBuffer,
OnGetTransferBuffer);
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateVideoDecoder,
+ OnCreateVideoDecoder)
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyVideoDecoder,
+ OnDestroyVideoDecoder)
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer,
OnResizeOffscreenFrameBuffer);
#if defined(OS_MACOSX)
@@ -100,6 +104,12 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
#endif // defined(OS_MACOSX)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+
+ // If this message isn't intended for the stub, try to route it to the video
+ // decoder.
+ if (!handled && video_decoder_.get())
+ handled = video_decoder_->OnMessageReceived(message);
+
DCHECK(handled);
return handled;
}
@@ -573,4 +583,16 @@ void GpuCommandBufferStub::ReportState() {
}
}
+void GpuCommandBufferStub::OnCreateVideoDecoder(
+ int32 decoder_host_id, const std::vector<uint32>& configs) {
+ video_decoder_.reset(
+ new GpuVideoDecodeAccelerator(this, decoder_host_id, this));
+ video_decoder_->Initialize(configs);
+}
+
+void GpuCommandBufferStub::OnDestroyVideoDecoder() {
+ LOG(ERROR) << "GpuCommandBufferStub::OnDestroyVideoDecoder";
+ video_decoder_.reset();
+}
+
#endif // defined(ENABLE_GPU)
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698