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

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 d1e41d46a6425247c9c8611804139ab0b9cc82ae..6198bf3bac65c3791a65e37ec9cf91c9c6ecad29 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()));
piman 2011/06/28 01:19:22 FYI, context3d->gles2_impl() will be NULL in out-o
Ami GONE FROM CHROMIUM 2011/06/28 21:00:53 Done.
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(
@@ -223,10 +222,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) {
@@ -237,10 +234,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(

Powered by Google App Engine
This is Rietveld 408576698