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

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

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/fake_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/fake_video_decode_accelerator.cc b/content/common/gpu/media/fake_video_decode_accelerator.cc
index eff497f48e7fbad6bb33a02ca00774ab59628a71..61f544538faa12f06c1e13a4c111effade8aa9a2 100644
--- a/content/common/gpu/media/fake_video_decode_accelerator.cc
+++ b/content/common/gpu/media/fake_video_decode_accelerator.cc
@@ -42,6 +42,7 @@ FakeVideoDecodeAccelerator::~FakeVideoDecodeAccelerator() {
}
bool FakeVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
+ uint32 min_picture_count,
Client* client) {
DCHECK(child_task_runner_->BelongsToCurrentThread());
if (profile == media::VIDEO_CODEC_PROFILE_UNKNOWN) {
@@ -51,7 +52,8 @@ bool FakeVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
// V4L2VideoDecodeAccelerator waits until first decode call to ask for buffers
// This class asks for it on initialization instead.
client_ = client;
- client_->ProvidePictureBuffers(kNumBuffers,
+ client_->ProvidePictureBuffers(std::max(min_picture_count,
+ static_cast<uint32>(kNumBuffers)),
frame_buffer_size_,
kDefaultTextureTarget);
return true;

Powered by Google App Engine
This is Rietveld 408576698