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

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: 890d8f71 last fischman@ bits 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/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 9f9eeaedeaf22fcd8beacce23375d290acfccb11..359c5807a1d29e23818b034af81cb96a33e87e74 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"
@@ -529,24 +530,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() {
@@ -594,4 +586,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

Powered by Google App Engine
This is Rietveld 408576698