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

Unified Diff: ppapi/tests/test_video_decoder.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_unittest.cc ('k') | ppapi/thunk/interfaces_ppb_public_dev_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_video_decoder.cc
diff --git a/ppapi/tests/test_video_decoder.cc b/ppapi/tests/test_video_decoder.cc
index f5d5bc0ed31bb63ee1cc05cfd1ba3f7e1b0363c5..f396bda8e3fa2b70570967ece1d0b4285aa630ae 100644
--- a/ppapi/tests/test_video_decoder.cc
+++ b/ppapi/tests/test_video_decoder.cc
@@ -11,8 +11,6 @@
REGISTER_TEST_CASE(VideoDecoder);
-static const bool kAllowSoftwareFallback = true;
-
bool TestVideoDecoder::Init() {
video_decoder_interface_ = static_cast<const PPB_VideoDecoder_0_1*>(
pp::Module::Get()->GetBrowserInterface(PPB_VIDEODECODER_INTERFACE_0_1));
@@ -37,10 +35,11 @@ std::string TestVideoDecoder::TestCreate() {
TestCompletionCallback callback(instance_->pp_instance(), callback_type());
pp::Graphics3D null_graphics_3d;
- callback.WaitForResult(video_decoder.Initialize(null_graphics_3d,
- PP_VIDEOPROFILE_VP8_ANY,
- kAllowSoftwareFallback,
- callback.GetCallback()));
+ callback.WaitForResult(
+ video_decoder.Initialize(null_graphics_3d,
+ PP_VIDEOPROFILE_VP8_ANY,
+ PP_HARDWAREACCELERATION_WITHFALLBACK,
+ callback.GetCallback()));
ASSERT_EQ(PP_ERROR_BADRESOURCE, callback.result());
}
// Test that Initialize fails with a bad profile enum value.
@@ -48,10 +47,11 @@ std::string TestVideoDecoder::TestCreate() {
pp::VideoDecoder video_decoder(instance_);
TestCompletionCallback callback(instance_->pp_instance(), callback_type());
const PP_VideoProfile kInvalidProfile = static_cast<PP_VideoProfile>(-1);
- callback.WaitForResult(video_decoder.Initialize(graphics_3d_,
- kInvalidProfile,
- kAllowSoftwareFallback,
- callback.GetCallback()));
+ callback.WaitForResult(
+ video_decoder.Initialize(graphics_3d_,
+ kInvalidProfile,
+ PP_HARDWAREACCELERATION_WITHFALLBACK,
+ callback.GetCallback()));
ASSERT_EQ(PP_ERROR_BADARGUMENT, callback.result());
}
// Test that Initialize succeeds if we can create a Graphics3D resources and
@@ -59,10 +59,11 @@ std::string TestVideoDecoder::TestCreate() {
if (!graphics_3d_.is_null()) {
pp::VideoDecoder video_decoder(instance_);
TestCompletionCallback callback(instance_->pp_instance(), callback_type());
- callback.WaitForResult(video_decoder.Initialize(graphics_3d_,
- PP_VIDEOPROFILE_VP8_ANY,
- kAllowSoftwareFallback,
- callback.GetCallback()));
+ callback.WaitForResult(
+ video_decoder.Initialize(graphics_3d_,
+ PP_VIDEOPROFILE_VP8_ANY,
+ PP_HARDWAREACCELERATION_WITHFALLBACK,
+ callback.GetCallback()));
ASSERT_EQ(PP_OK, callback.result());
}
« no previous file with comments | « ppapi/proxy/video_decoder_resource_unittest.cc ('k') | ppapi/thunk/interfaces_ppb_public_dev_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698