summaryrefslogtreecommitdiffstats
path: root/ppapi/examples/gles2
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/examples/gles2
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/examples/gles2')
-rw-r--r--ppapi/examples/gles2/gles2.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index e46f02d..e917374 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -213,16 +213,12 @@ void GLES2DemoInstance::DidChangeView(
}
void GLES2DemoInstance::InitializeDecoder() {
- assert(!video_decoder_);
- video_decoder_ = new pp::VideoDecoder_Dev(*this);
-
PP_VideoConfigElement configs = PP_VIDEOATTR_DICTIONARY_TERMINATOR;
- pp::CompletionCallback cb =
- callback_factory_.NewCallback(&GLES2DemoInstance::DecoderInitDone);
- video_decoder_->Initialize(&configs, *context_, cb);
-}
-void GLES2DemoInstance::DecoderInitDone(int32_t result) {
+ assert(!video_decoder_);
+ video_decoder_ = new pp::VideoDecoder_Dev(*this, *context_, &configs);
+ assert(!video_decoder_->is_null());
+
DecodeNextNALUs();
}