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

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: Address 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
« no previous file with comments | « ppapi/proxy/video_decoder_resource.h ('k') | ppapi/proxy/video_decoder_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d430edce9d71a2ea8e4bcb4e416431d27f2188fd 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 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, acceleration),
base::Bind(&VideoDecoderResource::OnPluginMsgInitializeComplete, this));
return PP_OK_COMPLETIONPENDING;
« no previous file with comments | « ppapi/proxy/video_decoder_resource.h ('k') | ppapi/proxy/video_decoder_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698