Commit 221b0de5 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

components/arc: AssignPictureBuffers informs only count

This is a partial revert of crrev.com/c/1694962. I was going to use frame size
by AssignPictureBuffers(). However, the frame size is also known by
ImportBufferForPicture(). The frame size in AssignPictureBuffers() even can be
wrong in secure mode. So I would dealy and call VDA::AssignPictureBuffers()
in GAVDA::ImportBufferForPicture on the first picture buffer. So the mojo change
and GAVDA change in crrev.com/c/1694962 is unnecessary.
NOTE: I haven't changed ARC++ and ChromeOS side for this mojo change. So it is
safe to revert the mojo change.

Bug: 979115
Test: None
Change-Id: Ie8f7f3dd9e4b104ed2e590379ec86e88ad76e708
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1720298
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682662}
parent 0de6e103
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Next MinVersion: 5
// Next MinVersion: 4
// This file defines the mojo interface between Android and Chromium for video
// decoding. Any Mojo callee that returns a value does so by callback.
......@@ -78,7 +78,7 @@ struct VideoDecodeAcceleratorConfig {
// the dummy buffer.
//
// Deprecated method IDs: 3, 7, 8
// Next method ID: 11
// Next method ID: 10
interface VideoDecodeAccelerator {
[Extensible]
enum Result {
......@@ -104,13 +104,7 @@ interface VideoDecodeAccelerator {
// Sets the number of output picture buffers.
// This releases any buffers in use/imported previously.
AssignPictureBuffersDeprecated@2(uint32 count);
// Sets the number of output picture buffers. |size| is the frame size
// adjusted by Android.
// This releases any buffers in use/imported previously.
[MinVersion=4]
AssignPictureBuffers@10(uint32 count, Size size);
AssignPictureBuffers@2(uint32 count);
// Imports a buffer to be used by the accelerator with specified
// |picture_buffer_id|.
......
......@@ -402,13 +402,7 @@ void GpuArcVideoDecodeAccelerator::Decode(
}
}
void GpuArcVideoDecodeAccelerator::AssignPictureBuffersDeprecated(
uint32_t count) {
AssignPictureBuffers(count, pending_coded_size_);
}
void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count,
const gfx::Size& size) {
void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count) {
VLOGF(2) << "count=" << count;
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!vda_) {
......@@ -423,7 +417,7 @@ void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count,
return;
}
coded_size_ = size;
coded_size_ = pending_coded_size_;
std::vector<media::PictureBuffer> buffers;
for (uint32_t id = 0; id < count; ++id) {
buffers.push_back(
......
......@@ -64,8 +64,7 @@ class GpuArcVideoDecodeAccelerator
mojom::VideoDecodeClientPtr client,
InitializeCallback callback) override;
void Decode(mojom::BitstreamBufferPtr bitstream_buffer) override;
void AssignPictureBuffersDeprecated(uint32_t count) override;
void AssignPictureBuffers(uint32_t count, const gfx::Size& size) override;
void AssignPictureBuffers(uint32_t count) override;
void ImportBufferForPicture(int32_t picture_buffer_id,
mojom::HalPixelFormat format,
mojo::ScopedHandle handle,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment