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

Unified Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 2019333004: Revert of 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
« no previous file with comments | « media/gpu/vaapi_video_decode_accelerator.cc ('k') | media/gpu/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 66ba26d81d65342fa8e4a27e4e17ac7c586dade2..f9f271189ce02985d167631745cc1fe06b8f6550 100644
--- a/media/gpu/video_decode_accelerator_unittest.cc
+++ b/media/gpu/video_decode_accelerator_unittest.cc
@@ -422,7 +422,6 @@
// 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;
@@ -497,7 +496,6 @@
media::VideoCodecProfile profile_;
int fake_decoder_;
GLenum texture_target_;
- VideoPixelFormat pixel_format_;
bool suppress_rendering_;
std::vector<base::TimeTicks> frame_delivery_times_;
int delay_reuse_after_frame_num_;
@@ -576,7 +574,6 @@
num_done_bitstream_buffers_(0),
fake_decoder_(fake_decoder),
texture_target_(0),
- pixel_format_(PIXEL_FORMAT_UNKNOWN),
suppress_rendering_(suppress_rendering),
delay_reuse_after_frame_num_(delay_reuse_after_frame_num),
decode_calls_per_second_(decode_calls_per_second),
@@ -644,7 +641,6 @@
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) {
@@ -654,12 +650,6 @@
std::vector<media::PictureBuffer> buffers;
requested_num_of_buffers += kExtraPictureBuffers;
- if (pixel_format == media::PIXEL_FORMAT_UNKNOWN)
- pixel_format = media::PIXEL_FORMAT_ARGB;
-
- LOG_ASSERT((pixel_format_ == PIXEL_FORMAT_UNKNOWN) ||
- (pixel_format_ == pixel_format));
- pixel_format_ = pixel_format;
texture_target_ = texture_target;
for (uint32_t i = 0; i < requested_num_of_buffers; ++i) {
@@ -675,6 +665,9 @@
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 {
« no previous file with comments | « media/gpu/vaapi_video_decode_accelerator.cc ('k') | media/gpu/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698