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

Unified Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved constant to shared header, validate min_picture_size now in resource proxy as well as host co… Created 5 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 | « content/renderer/pepper/video_decoder_shim.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/video_decoder_shim.cc
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index 512211778a819f102f02f9cc052a8cccb241bbd1..d395c22bcac8cbfc8bcdc860ff6c8a6003019520 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -730,11 +730,9 @@ void VideoDecoderShim::DecoderImpl::Stop() {
void VideoDecoderShim::DecoderImpl::OnInitDone(bool success) {
int32_t result = success ? PP_OK : PP_ERROR_NOTSUPPORTED;
- // Calculate how many textures the shim should create.
- uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1;
main_task_runner_->PostTask(
FROM_HERE, base::Bind(&VideoDecoderShim::OnInitializeComplete, shim_,
- result, shim_texture_pool_size));
+ result));
}
void VideoDecoderShim::DecoderImpl::DoDecode() {
@@ -799,14 +797,15 @@ void VideoDecoderShim::DecoderImpl::OnResetComplete() {
FROM_HERE, base::Bind(&VideoDecoderShim::OnResetComplete, shim_));
}
-VideoDecoderShim::VideoDecoderShim(PepperVideoDecoderHost* host)
+VideoDecoderShim::VideoDecoderShim(
+ PepperVideoDecoderHost* host, uint32_t texture_pool_size)
: state_(UNINITIALIZED),
host_(host),
media_task_runner_(
RenderThreadImpl::current()->GetMediaThreadTaskRunner()),
context_provider_(
RenderThreadImpl::current()->SharedMainThreadContextProvider()),
- texture_pool_size_(0),
+ texture_pool_size_(texture_pool_size),
num_pending_decodes_(0),
yuv_converter_(new YUVConverter(context_provider_)),
weak_ptr_factory_(this) {
@@ -948,14 +947,12 @@ void VideoDecoderShim::Destroy() {
delete this;
}
-void VideoDecoderShim::OnInitializeComplete(int32_t result,
- uint32_t texture_pool_size) {
+void VideoDecoderShim::OnInitializeComplete(int32_t result) {
DCHECK(RenderThreadImpl::current());
DCHECK(host_);
if (result == PP_OK) {
state_ = DECODING;
- texture_pool_size_ = texture_pool_size;
}
host_->OnInitializeComplete(result);
« no previous file with comments | « content/renderer/pepper/video_decoder_shim.h ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698