summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:25:38 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 19:25:38 +0000
commitc8423065a0054dc81e72801dfd60b99483f70b79 (patch)
treec23140bb47c7edfb80309ffa767ba301167acb8b /ppapi/thunk
parent94bef5ad7ddd08327f7d80d50a187c86d78fccf7 (diff)
downloadchromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.zip
chromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.tar.gz
chromium_src-c8423065a0054dc81e72801dfd60b99483f70b79.tar.bz2
PPB_VideoDecoder_Dev::Initialize is now synchronous!
Apparently flash can't deal with async init, so we make it synchronous. We keep processing in the GPU process asynchronous and just take the blocking hit on the renderer. BUG=none TEST=gles2, ovdatest, trybots Review URL: http://codereview.chromium.org/7474006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/ppb_video_decoder_api.h3
-rw-r--r--ppapi/thunk/ppb_video_decoder_thunk.cc19
-rw-r--r--ppapi/thunk/resource_creation_api.h5
3 files changed, 8 insertions, 19 deletions
diff --git a/ppapi/thunk/ppb_video_decoder_api.h b/ppapi/thunk/ppb_video_decoder_api.h
index 5f8063c..e17d22b 100644
--- a/ppapi/thunk/ppb_video_decoder_api.h
+++ b/ppapi/thunk/ppb_video_decoder_api.h
@@ -14,9 +14,6 @@ class PPB_VideoDecoder_API {
public:
virtual ~PPB_VideoDecoder_API() {}
- virtual int32_t Initialize(PP_Resource context_id,
- const PP_VideoConfigElement* decoder_config,
- PP_CompletionCallback callback) = 0;
virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
PP_CompletionCallback callback) = 0;
virtual void AssignPictureBuffers(uint32_t no_of_buffers,
diff --git a/ppapi/thunk/ppb_video_decoder_thunk.cc b/ppapi/thunk/ppb_video_decoder_thunk.cc
index f1b7c44..cb0485c 100644
--- a/ppapi/thunk/ppb_video_decoder_thunk.cc
+++ b/ppapi/thunk/ppb_video_decoder_thunk.cc
@@ -16,11 +16,13 @@ namespace {
typedef EnterResource<PPB_VideoDecoder_API> EnterVideoDecoder;
-PP_Resource Create(PP_Instance instance) {
+PP_Resource Create(PP_Instance instance,
+ PP_Resource context_3d,
+ const PP_VideoConfigElement* config) {
EnterFunction<ResourceCreationAPI> enter(instance, true);
if (enter.failed())
return 0;
- return enter.functions()->CreateVideoDecoder(instance);
+ return enter.functions()->CreateVideoDecoder(instance, context_3d, config);
}
PP_Bool IsVideoDecoder(PP_Resource resource) {
@@ -28,18 +30,6 @@ PP_Bool IsVideoDecoder(PP_Resource resource) {
return PP_FromBool(enter.succeeded());
}
-int32_t Initialize(PP_Resource video_decoder,
- PP_Resource context_id,
- const PP_VideoConfigElement* decoder_config,
- PP_CompletionCallback callback) {
- EnterVideoDecoder enter(video_decoder, true);
- if (enter.failed())
- return MayForceCallback(callback, PP_ERROR_BADRESOURCE);
- int32_t result =
- enter.object()->Initialize(context_id, decoder_config, callback);
- return MayForceCallback(callback, result);
-}
-
int32_t Decode(PP_Resource video_decoder,
const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
PP_CompletionCallback callback) {
@@ -90,7 +80,6 @@ void Destroy(PP_Resource video_decoder) {
const PPB_VideoDecoder_Dev g_ppb_videodecoder_thunk = {
&Create,
&IsVideoDecoder,
- &Initialize,
&Decode,
&AssignPictureBuffers,
&ReusePictureBuffer,
diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h
index 4e6124e..8d6c01b 100644
--- a/ppapi/thunk/resource_creation_api.h
+++ b/ppapi/thunk/resource_creation_api.h
@@ -109,7 +109,10 @@ class ResourceCreationAPI {
const char* proto) = 0;
virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0;
virtual PP_Resource CreateURLRequestInfo(PP_Instance instance) = 0;
- virtual PP_Resource CreateVideoDecoder(PP_Instance instance) = 0;
+ virtual PP_Resource CreateVideoDecoder(
+ PP_Instance instance,
+ PP_Resource context3d_id,
+ const PP_VideoConfigElement* config) = 0;
virtual PP_Resource CreateVideoLayer(PP_Instance instance,
PP_VideoLayerMode_Dev mode) = 0;
virtual PP_Resource CreateWheelInputEvent(