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

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: 56683e7a 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 05ee4d8cd25d9fc573f7ec8aaac44cd4f3f0f76c..e89c8ee7cddb4be3d43216d58f9550d3a7fb905e 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"
@@ -179,27 +178,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());
Pawel Osciak 2014/03/13 06:18:13 DCHECK_NE ?
sheu 2014/03/13 22:39:52 Usually, but in this case having the iterator poin
+ return it->second->CreateVideoEncoder();
}
void GpuChannelHost::DestroyCommandBuffer(

Powered by Google App Engine
This is Rietveld 408576698