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

Unified Diff: ppapi/proxy/video_decoder_resource.cc

Issue 496203002: Pepper: PPB_VideoDecoder software-only mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cpp comments Created 6 years, 4 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/proxy/video_decoder_resource.cc
diff --git a/ppapi/proxy/video_decoder_resource.cc b/ppapi/proxy/video_decoder_resource.cc
index 54ccfe78254a870493826f8301e6b77b30742b43..e95f5f1cb5877a30b02f2ea68439361bdaec08a0 100644
--- a/ppapi/proxy/video_decoder_resource.cc
+++ b/ppapi/proxy/video_decoder_resource.cc
@@ -85,11 +85,24 @@ PPB_VideoDecoder_API* VideoDecoderResource::AsPPB_VideoDecoder_API() {
return this;
}
-int32_t VideoDecoderResource::Initialize(
+int32_t VideoDecoderResource::Initialize0_1(
PP_Resource graphics_context,
PP_VideoProfile profile,
PP_Bool allow_software_fallback,
scoped_refptr<TrackedCallback> callback) {
+ return Initialize(graphics_context,
+ profile,
+ allow_software_fallback
+ ? PP_HARDWAREACCELERATION_WITHFALLBACK
+ : PP_HARDWAREACCELERATION_ONLY,
+ callback);
+}
+
+int32_t VideoDecoderResource::Initialize(
+ PP_Resource graphics_context,
+ PP_VideoProfile profile,
+ PP_HardwareAcceleration hardware_acceleration,
+ scoped_refptr<TrackedCallback> callback) {
if (initialized_)
return PP_ERROR_FAILED;
if (profile < 0 || profile > PP_VIDEOPROFILE_MAX)
@@ -128,7 +141,7 @@ int32_t VideoDecoderResource::Initialize(
Call<PpapiPluginMsg_VideoDecoder_InitializeReply>(
RENDERER,
PpapiHostMsg_VideoDecoder_Initialize(
- host_resource, profile, PP_ToBool(allow_software_fallback)),
+ host_resource, profile, hardware_acceleration),
base::Bind(&VideoDecoderResource::OnPluginMsgInitializeComplete, this));
return PP_OK_COMPLETIONPENDING;

Powered by Google App Engine
This is Rietveld 408576698