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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.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
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/command_buffer_proxy_impl.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 3cf28b67e1360904a2972329036cd2eef94f8326..9c3ca3dde6560702016a715ca755e944a0d2a680 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -12,6 +12,7 @@
#include "content/common/child_process_messages.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
+#include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
@@ -459,24 +460,15 @@ bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
}
scoped_ptr<media::VideoDecodeAccelerator>
-CommandBufferProxyImpl::CreateVideoDecoder(media::VideoCodecProfile profile) {
- int decoder_route_id;
- scoped_ptr<media::VideoDecodeAccelerator> vda;
- if (!Send(new GpuCommandBufferMsg_CreateVideoDecoder(route_id_, profile,
- &decoder_route_id))) {
- LOG(ERROR) << "Send(GpuCommandBufferMsg_CreateVideoDecoder) failed";
- return vda.Pass();
- }
-
- if (decoder_route_id < 0) {
- DLOG(ERROR) << "Failed to Initialize GPU decoder on profile: " << profile;
- return vda.Pass();
- }
+CommandBufferProxyImpl::CreateVideoDecoder() {
+ return scoped_ptr<media::VideoDecodeAccelerator>(
+ new GpuVideoDecodeAcceleratorHost(channel_, this));
+}
- GpuVideoDecodeAcceleratorHost* decoder_host =
- new GpuVideoDecodeAcceleratorHost(channel_, decoder_route_id, this);
- vda.reset(decoder_host);
- return vda.Pass();
+scoped_ptr<media::VideoEncodeAccelerator>
+CommandBufferProxyImpl::CreateVideoEncoder() {
+ return scoped_ptr<media::VideoEncodeAccelerator>(
+ new GpuVideoEncodeAcceleratorHost(channel_, this));
}
gpu::error::Error CommandBufferProxyImpl::GetLastError() {
@@ -524,4 +516,9 @@ void CommandBufferProxyImpl::TryUpdateState() {
shared_state()->Read(&last_state_);
}
+gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const {
+ return reinterpret_cast<gpu::CommandBufferSharedState*>(
+ shared_state_shm_->memory());
+}
+
} // namespace content
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698