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

Unified Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.cc

Issue 7260008: Implement proper synchronization between HW video decode IPC and CommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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: webkit/plugins/ppapi/ppb_video_decoder_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
index 12d6ee18a404a73481147700fccf983ca249f4e9..19fa7765e65dc1a55c3ef005f0ec4b533d7cd11c 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
+#include "gpu/command_buffer/client/gles2_implementation.h"
#include "media/video/picture.h"
#include "ppapi/c/dev/pp_video_dev.h"
#include "ppapi/c/dev/ppb_video_decoder_dev.h"
@@ -127,7 +128,7 @@ int32_t PPB_VideoDecoder_Impl::Initialize(
platform_video_decoder_.reset(
instance()->delegate()->CreateVideoDecoder(
- this, command_buffer_route_id));
+ this, command_buffer_route_id, context3d->gles2_impl()->helper()));
if (!platform_video_decoder_.get())
return PP_ERROR_FAILED;
@@ -160,10 +161,8 @@ int32_t PPB_VideoDecoder_Impl::Decode(
CHECK(bitstream_buffer_callbacks_.insert(std::make_pair(
bitstream_buffer->id, callback)).second);
- if (platform_video_decoder_->Decode(decode_buffer))
- return PP_OK_COMPLETIONPENDING;
- else
- return PP_ERROR_FAILED;
+ platform_video_decoder_->Decode(decode_buffer);
+ return PP_OK_COMPLETIONPENDING;
}
void PPB_VideoDecoder_Impl::AssignGLESBuffers(
@@ -210,10 +209,8 @@ int32_t PPB_VideoDecoder_Impl::Flush(PP_CompletionCallback callback) {
// TODO(vmr): Check for current flush/abort operations.
flush_callback_ = callback;
- if (platform_video_decoder_->Flush())
- return PP_OK_COMPLETIONPENDING;
- else
- return PP_ERROR_FAILED;
+ platform_video_decoder_->Flush();
+ return PP_OK_COMPLETIONPENDING;
}
int32_t PPB_VideoDecoder_Impl::Abort(PP_CompletionCallback callback) {
@@ -224,10 +221,8 @@ int32_t PPB_VideoDecoder_Impl::Abort(PP_CompletionCallback callback) {
// TODO(vmr): Check for current flush/abort operations.
abort_callback_ = callback;
- if (platform_video_decoder_->Abort())
- return PP_OK_COMPLETIONPENDING;
- else
- return PP_ERROR_FAILED;
+ platform_video_decoder_->Abort();
+ return PP_OK_COMPLETIONPENDING;
}
void PPB_VideoDecoder_Impl::ProvidePictureBuffers(
« content/common/gpu/gpu_messages.h ('K') | « webkit/plugins/ppapi/plugin_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698