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

Unified Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 185403020: Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 7da5b6ec Rebase. Created 6 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/client/gpu_channel_host.cc
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index 2a31c7c0ae1b545165fa67459f3810c3c0907624..28edbdd5ea6f60e1f52b58706e83c2b25a39627d 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -13,7 +13,6 @@
#include "base/posix/eintr_wrapper.h"
#include "base/threading/thread_restrictions.h"
#include "content/common/gpu/client/command_buffer_proxy_impl.h"
-#include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
#include "content/common/gpu/gpu_messages.h"
#include "ipc/ipc_sync_message_filter.h"
#include "url/gurl.h"
@@ -194,27 +193,21 @@ CommandBufferProxyImpl* GpuChannelHost::CreateOffscreenCommandBuffer(
}
scoped_ptr<media::VideoDecodeAccelerator> GpuChannelHost::CreateVideoDecoder(
- int command_buffer_route_id,
- media::VideoCodecProfile profile) {
+ int command_buffer_route_id) {
+ TRACE_EVENT0("gpu", "GpuChannelHost::CreateVideoDecoder");
AutoLock lock(context_lock_);
ProxyMap::iterator it = proxies_.find(command_buffer_route_id);
DCHECK(it != proxies_.end());
- CommandBufferProxyImpl* proxy = it->second;
- return proxy->CreateVideoDecoder(profile).Pass();
+ return it->second->CreateVideoDecoder();
}
-scoped_ptr<media::VideoEncodeAccelerator> GpuChannelHost::CreateVideoEncoder() {
+scoped_ptr<media::VideoEncodeAccelerator> GpuChannelHost::CreateVideoEncoder(
+ int command_buffer_route_id) {
TRACE_EVENT0("gpu", "GpuChannelHost::CreateVideoEncoder");
-
- scoped_ptr<media::VideoEncodeAccelerator> vea;
- int32 route_id = MSG_ROUTING_NONE;
- if (!Send(new GpuChannelMsg_CreateVideoEncoder(&route_id)))
- return vea.Pass();
- if (route_id == MSG_ROUTING_NONE)
- return vea.Pass();
-
- vea.reset(new GpuVideoEncodeAcceleratorHost(this, route_id));
- return vea.Pass();
+ AutoLock lock(context_lock_);
+ ProxyMap::iterator it = proxies_.find(command_buffer_route_id);
+ DCHECK(it != proxies_.end());
+ return it->second->CreateVideoEncoder();
}
void GpuChannelHost::DestroyCommandBuffer(
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/client/gpu_video_decode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698