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

Side by Side Diff: content/common/gpu/media/android_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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/android_video_decode_accelerator.h" 5 #include "content/common/gpu/media/android_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 INVALID_ARGUMENT); 408 INVALID_ARGUMENT);
409 int32 id = buffers[i].id(); 409 int32 id = buffers[i].id();
410 output_picture_buffers_.insert(std::make_pair(id, buffers[i])); 410 output_picture_buffers_.insert(std::make_pair(id, buffers[i]));
411 free_picture_ids_.push(id); 411 free_picture_ids_.push(id);
412 // Since the client might be re-using |picture_buffer_id| values, forget 412 // Since the client might be re-using |picture_buffer_id| values, forget
413 // about previously-dismissed IDs now. See ReusePictureBuffer() comment 413 // about previously-dismissed IDs now. See ReusePictureBuffer() comment
414 // about "zombies" for why we maintain this set in the first place. 414 // about "zombies" for why we maintain this set in the first place.
415 dismissed_picture_ids_.erase(id); 415 dismissed_picture_ids_.erase(id);
416 } 416 }
417 417
418 RETURN_ON_FAILURE(output_picture_buffers_.size() == kNumPictureBuffers, 418 RETURN_ON_FAILURE(output_picture_buffers_.size() >= kNumPictureBuffers,
419 "Invalid picture buffers were passed.", 419 "Invalid picture buffers were passed.",
420 INVALID_ARGUMENT); 420 INVALID_ARGUMENT);
421 421
422 DoIOTask(); 422 DoIOTask();
423 } 423 }
424 424
425 void AndroidVideoDecodeAccelerator::ReusePictureBuffer( 425 void AndroidVideoDecodeAccelerator::ReusePictureBuffer(
426 int32 picture_buffer_id) { 426 int32 picture_buffer_id) {
427 DCHECK(thread_checker_.CalledOnValidThread()); 427 DCHECK(thread_checker_.CalledOnValidThread());
428 428
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 SupportedProfile profile; 565 SupportedProfile profile;
566 profile.profile = media::VP8PROFILE_ANY; 566 profile.profile = media::VP8PROFILE_ANY;
567 profile.min_resolution.SetSize(16, 16); 567 profile.min_resolution.SetSize(16, 16);
568 profile.max_resolution.SetSize(1920, 1088); 568 profile.max_resolution.SetSize(1920, 1088);
569 profiles.push_back(profile); 569 profiles.push_back(profile);
570 return profiles; 570 return profiles;
571 } 571 }
572 572
573 } // namespace content 573 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698