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

Unified Diff: content/common/gpu/media/omx_video_decode_accelerator_unittest.cc

Issue 8897022: Revert 113895 - <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « content/common/gpu/media/omx_video_decode_accelerator.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/omx_video_decode_accelerator_unittest.cc
===================================================================
--- content/common/gpu/media/omx_video_decode_accelerator_unittest.cc (revision 113906)
+++ content/common/gpu/media/omx_video_decode_accelerator_unittest.cc (working copy)
@@ -576,7 +576,8 @@
return;
// Configure the decoder.
- media::VideoDecodeAccelerator::Profile profile = media::H264PROFILE_BASELINE;
+ media::VideoDecodeAccelerator::Profile profile =
+ media::VideoDecodeAccelerator::H264PROFILE_BASELINE;
if (profile_ != -1)
profile = static_cast<media::VideoDecodeAccelerator::Profile>(profile_);
CHECK(decoder_->Initialize(profile));
@@ -802,10 +803,9 @@
<< ", instead of " << expected_state;
}
-// We assert a minimal number of concurrent decoders we expect to succeed.
-// Different platforms can support more concurrent decoders, so we don't assert
-// failure above this.
-enum { kMinSupportedNumConcurrentDecoders = 3 };
+// We assert the exact number of concurrent decoders we expect to succeed and
+// that one more than that fails initialization.
+enum { kMaxSupportedNumConcurrentDecoders = 3 };
// Test the most straightforward case possible: data is decoded from a single
// chunk and rendered to the screen.
@@ -889,7 +889,7 @@
// We expect initialization to fail only when more than the supported
// number of decoders is instantiated. Assert here that something else
// didn't trigger failure.
- ASSERT_GT(num_concurrent_decoders, kMinSupportedNumConcurrentDecoders);
+ ASSERT_GT(num_concurrent_decoders, kMaxSupportedNumConcurrentDecoders);
continue;
}
ASSERT_EQ(state, CS_INITIALIZED);
@@ -908,6 +908,9 @@
ASSERT_NO_FATAL_FAILURE(
AssertWaitForStateOrDeleted(note, clients[i], CS_DESTROYED));
}
+ ASSERT_EQ(saw_init_failure,
+ num_concurrent_decoders > kMaxSupportedNumConcurrentDecoders)
+ << num_concurrent_decoders;
// Finally assert that decoding went as expected.
for (size_t i = 0; i < num_concurrent_decoders && !saw_init_failure; ++i) {
// We can only make performance/correctness assertions if the decoder was
@@ -994,9 +997,9 @@
ResourceExhaustion, OmxVideoDecodeAcceleratorTest,
::testing::Values(
// +0 hack below to promote enum to int.
- MakeTuple(1, kMinSupportedNumConcurrentDecoders + 0, 1,
+ MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 0, 1,
END_OF_STREAM_RESET, CS_RESET),
- MakeTuple(1, kMinSupportedNumConcurrentDecoders + 1, 1,
+ MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 1, 1,
END_OF_STREAM_RESET, CS_RESET)));
// TODO(fischman, vrk): add more tests! In particular:
« no previous file with comments | « content/common/gpu/media/omx_video_decode_accelerator.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698