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 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Next MinVersion: 5 // Next MinVersion: 4
// This file defines the mojo interface between Android and Chromium for video // This file defines the mojo interface between Android and Chromium for video
// decoding. Any Mojo callee that returns a value does so by callback. // decoding. Any Mojo callee that returns a value does so by callback.
...@@ -78,7 +78,7 @@ struct VideoDecodeAcceleratorConfig { ...@@ -78,7 +78,7 @@ struct VideoDecodeAcceleratorConfig {
// the dummy buffer. // the dummy buffer.
// //
// Deprecated method IDs: 3, 7, 8 // Deprecated method IDs: 3, 7, 8
// Next method ID: 11 // Next method ID: 10
interface VideoDecodeAccelerator { interface VideoDecodeAccelerator {
[Extensible] [Extensible]
enum Result { enum Result {
...@@ -104,13 +104,7 @@ interface VideoDecodeAccelerator { ...@@ -104,13 +104,7 @@ interface VideoDecodeAccelerator {
// Sets the number of output picture buffers. // Sets the number of output picture buffers.
// This releases any buffers in use/imported previously. // This releases any buffers in use/imported previously.
AssignPictureBuffersDeprecated@2(uint32 count); AssignPictureBuffers@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);
// Imports a buffer to be used by the accelerator with specified // Imports a buffer to be used by the accelerator with specified
// |picture_buffer_id|. // |picture_buffer_id|.
......
...@@ -402,13 +402,7 @@ void GpuArcVideoDecodeAccelerator::Decode( ...@@ -402,13 +402,7 @@ void GpuArcVideoDecodeAccelerator::Decode(
} }
} }
void GpuArcVideoDecodeAccelerator::AssignPictureBuffersDeprecated( void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count) {
uint32_t count) {
AssignPictureBuffers(count, pending_coded_size_);
}
void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count,
const gfx::Size& size) {
VLOGF(2) << "count=" << count; VLOGF(2) << "count=" << count;
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!vda_) { if (!vda_) {
...@@ -423,7 +417,7 @@ void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count, ...@@ -423,7 +417,7 @@ void GpuArcVideoDecodeAccelerator::AssignPictureBuffers(uint32_t count,
return; return;
} }
coded_size_ = size; coded_size_ = pending_coded_size_;
std::vector<media::PictureBuffer> buffers; std::vector<media::PictureBuffer> buffers;
for (uint32_t id = 0; id < count; ++id) { for (uint32_t id = 0; id < count; ++id) {
buffers.push_back( buffers.push_back(
......
...@@ -64,8 +64,7 @@ class GpuArcVideoDecodeAccelerator ...@@ -64,8 +64,7 @@ class GpuArcVideoDecodeAccelerator
mojom::VideoDecodeClientPtr client, mojom::VideoDecodeClientPtr client,
InitializeCallback callback) override; InitializeCallback callback) override;
void Decode(mojom::BitstreamBufferPtr bitstream_buffer) override; void Decode(mojom::BitstreamBufferPtr bitstream_buffer) override;
void AssignPictureBuffersDeprecated(uint32_t count) override; void AssignPictureBuffers(uint32_t count) override;
void AssignPictureBuffers(uint32_t count, const gfx::Size& size) override;
void ImportBufferForPicture(int32_t picture_buffer_id, void ImportBufferForPicture(int32_t picture_buffer_id,
mojom::HalPixelFormat format, mojom::HalPixelFormat format,
mojo::ScopedHandle handle, 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