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

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

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Documented actual may be larger than requested count. Created 5 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: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index 04978bc61837ff06367d3a15e2894cbb817dbab4..d3693785a33ed8cca0a8a3e8ffe6b3df7c5234f8 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -143,6 +143,9 @@ const int kMaxFramesToDelayReuse = 64;
const base::TimeDelta kReuseDelay = base::TimeDelta::FromSeconds(1);
// Simulate WebRTC and call VDA::Decode 30 times per second.
const int kWebRtcDecodeCallsPerSecond = 30;
+// Simulate an adjustment to a larger number of pictures to make sure the
+// decoder supports an upwards adjustment.
+const int kExtraPictureBuffers = 2;
struct TestVideoFile {
explicit TestVideoFile(base::FilePath::StringType file_name)
@@ -596,7 +599,7 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
decoder_ = decoders[i].Pass();
weak_decoder_factory_.reset(
new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get()));
- if (decoder_->Initialize(profile_, client)) {
+ if (decoder_->Initialize(profile_, 0, client)) {
SetState(CS_DECODER_SET);
FinishInitialization();
return;
@@ -615,6 +618,8 @@ void GLRenderingVDAClient::ProvidePictureBuffers(
return;
std::vector<media::PictureBuffer> buffers;
+ requested_num_of_buffers += kExtraPictureBuffers;
+
texture_target_ = texture_target;
for (uint32 i = 0; i < requested_num_of_buffers; ++i) {
uint32 texture_id;

Powered by Google App Engine
This is Rietveld 408576698