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

Unified Diff: ppapi/cpp/dev/video_decoder_dev.cc

Issue 7361010: Enable fire-and-forget Destroy of HW video decoder, and misc other improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR responses. 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
Index: ppapi/cpp/dev/video_decoder_dev.cc
diff --git a/ppapi/cpp/dev/video_decoder_dev.cc b/ppapi/cpp/dev/video_decoder_dev.cc
index 89fe6aead54aa527c78d3eff71328bc83c6e6795..2ef19fcc1ab630fd66cff485750c533ccfda53d7 100644
--- a/ppapi/cpp/dev/video_decoder_dev.cc
+++ b/ppapi/cpp/dev/video_decoder_dev.cc
@@ -32,7 +32,10 @@ VideoDecoder_Dev::VideoDecoder_Dev(const Instance& instance) {
VideoDecoder_Dev::VideoDecoder_Dev(PP_Resource resource) : Resource(resource) {
}
-VideoDecoder_Dev::~VideoDecoder_Dev() {}
+VideoDecoder_Dev::~VideoDecoder_Dev() {
+ get_interface<PPB_VideoDecoder_Dev>()->Destroy(pp_resource());
+}
+
int32_t VideoDecoder_Dev::Initialize(const PP_VideoConfigElement* config,
const Context3D_Dev& context,
@@ -82,11 +85,4 @@ int32_t VideoDecoder_Dev::Reset(CompletionCallback callback) {
pp_resource(), callback.pp_completion_callback());
}
-int32_t VideoDecoder_Dev::Destroy(CompletionCallback callback) {
- if (!has_interface<PPB_VideoDecoder_Dev>())
- return callback.MayForce(PP_ERROR_NOINTERFACE);
- return get_interface<PPB_VideoDecoder_Dev>()->Destroy(
- pp_resource(), callback.pp_completion_callback());
-}
-
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698