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

Unified Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 1942123002: Plumb decoded video pixel format from GPU process to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: media/gpu/video_decode_accelerator_unittest.cc
diff --git a/media/gpu/video_decode_accelerator_unittest.cc b/media/gpu/video_decode_accelerator_unittest.cc
index 6f177c5324c5ff7e4b947f31628fbe5631fbcda6..2f682c87da7c0053f5387f8324ab013ad9320069 100644
--- a/media/gpu/video_decode_accelerator_unittest.cc
+++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -421,6 +421,7 @@ class GLRenderingVDAClient
// VideoDecodeAccelerator::Client implementation.
// The heart of the Client.
void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
+ VideoPixelFormat format,
uint32_t textures_per_buffer,
const gfx::Size& dimensions,
uint32_t texture_target) override;
@@ -640,6 +641,7 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
void GLRenderingVDAClient::ProvidePictureBuffers(
uint32_t requested_num_of_buffers,
+ VideoPixelFormat pixel_format,
uint32_t textures_per_buffer,
const gfx::Size& dimensions,
uint32_t texture_target) {
@@ -651,6 +653,8 @@ void GLRenderingVDAClient::ProvidePictureBuffers(
requested_num_of_buffers += kExtraPictureBuffers;
texture_target_ = texture_target;
+ if (pixel_format == media::PIXEL_FORMAT_UNKNOWN)
Pawel Osciak 2016/05/18 07:32:32 This is only needed inside the if() clause in l.67
+ pixel_format = media::PIXEL_FORMAT_ARGB;
for (uint32_t i = 0; i < requested_num_of_buffers; ++i) {
uint32_t texture_id;
base::WaitableEvent done(false, false);
@@ -664,9 +668,6 @@ void GLRenderingVDAClient::ProvidePictureBuffers(
base::Unretained(rendering_helper_), texture_id);
if (g_test_import) {
- media::VideoPixelFormat pixel_format = decoder_->GetOutputFormat();
- if (pixel_format == media::PIXEL_FORMAT_UNKNOWN)
- pixel_format = media::PIXEL_FORMAT_ARGB;
texture_ref = TextureRef::CreatePreallocated(
texture_id, delete_texture_cb, pixel_format, dimensions);
} else {

Powered by Google App Engine
This is Rietveld 408576698