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

Unified Diff: ppapi/examples/gles2/gles2.cc

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR update. Created 9 years, 5 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
« no previous file with comments | « ppapi/cpp/dev/video_decoder_dev.cc ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/gles2/gles2.cc
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index e46f02dca3a84315e9a9bac3ddcf61d06e779ffc..e9173749f63b0902daf32f1e186e0b7f25b4fb37 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();
}
« no previous file with comments | « ppapi/cpp/dev/video_decoder_dev.cc ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698