Commit 49753749 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Remove CodecAllocator::CreateMediaCodecSync(), no longer needed.

Now that AVDA is deleted, time to rename and remove lots of stuff!

We no longer need synchronous codec creation w/o AVDA!

BUG=none
TEST=compiles
R=liberato

Change-Id: Iba492149c2e395c45d76a67b752916560ff8ad25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1644161
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666176}
parent 8e106a90
......@@ -206,22 +206,6 @@ scoped_refptr<base::SingleThreadTaskRunner> CodecAllocator::TaskRunnerFor(
return threads_[task_type]->thread.task_runner();
}
std::unique_ptr<MediaCodecBridge> CodecAllocator::CreateMediaCodecSync(
scoped_refptr<CodecConfig> codec_config) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
auto task_type =
TaskTypeForAllocation(codec_config->software_codec_forbidden);
if (!task_type)
return nullptr;
auto codec = CreateMediaCodecInternal(factory_cb_, codec_config,
task_type == SW_CODEC);
if (codec)
codec_task_types_[codec.get()] = *task_type;
return codec;
}
void CodecAllocator::CreateMediaCodecAsync(
base::WeakPtr<CodecAllocatorClient> client,
scoped_refptr<CodecConfig> codec_config) {
......
......@@ -144,10 +144,6 @@ class MEDIA_GPU_EXPORT CodecAllocator {
virtual void StartThread(CodecAllocatorClient* client);
virtual void StopThread(CodecAllocatorClient* client);
// Create and configure a MediaCodec synchronously.
virtual std::unique_ptr<MediaCodecBridge> CreateMediaCodecSync(
scoped_refptr<CodecConfig> codec_config);
// Create and configure a MediaCodec asynchronously. The result is delivered
// via OnCodecConfigured().
virtual void CreateMediaCodecAsync(base::WeakPtr<CodecAllocatorClient> client,
......
......@@ -28,25 +28,6 @@ void FakeCodecAllocator::StartThread(CodecAllocatorClient* client) {}
void FakeCodecAllocator::StopThread(CodecAllocatorClient* client) {}
std::unique_ptr<MediaCodecBridge> FakeCodecAllocator::CreateMediaCodecSync(
scoped_refptr<CodecConfig> config) {
CopyCodecConfig(config);
MockCreateMediaCodecSync(most_recent_overlay, most_recent_texture_owner);
std::unique_ptr<MockMediaCodecBridge> codec;
if (allow_sync_creation) {
codec = std::make_unique<MockMediaCodecBridge>();
most_recent_codec = codec.get();
most_recent_codec_destruction_observer = codec->CreateDestructionObserver();
most_recent_codec_destruction_observer->DoNotAllowDestruction();
} else {
most_recent_codec = nullptr;
most_recent_codec_destruction_observer = nullptr;
}
return std::move(codec);
}
void FakeCodecAllocator::CreateMediaCodecAsync(
base::WeakPtr<CodecAllocatorClient> client,
scoped_refptr<CodecConfig> config) {
......
......@@ -30,7 +30,6 @@ class FakeCodecAllocator : public testing::NiceMock<CodecAllocator> {
// These are called with some parameters of the codec config by our
// implementation of their respective functions. This allows tests to set
// expectations on them.
MOCK_METHOD2(MockCreateMediaCodecSync, void(AndroidOverlay*, TextureOwner*));
MOCK_METHOD2(MockCreateMediaCodecAsync, void(AndroidOverlay*, TextureOwner*));
// Note that this doesn't exactly match the signature, since unique_ptr
......@@ -39,8 +38,6 @@ class FakeCodecAllocator : public testing::NiceMock<CodecAllocator> {
MOCK_METHOD3(MockReleaseMediaCodec,
void(MediaCodecBridge*, AndroidOverlay*, TextureOwner*));
std::unique_ptr<MediaCodecBridge> CreateMediaCodecSync(
scoped_refptr<CodecConfig> config) override;
void CreateMediaCodecAsync(base::WeakPtr<CodecAllocatorClient> client,
scoped_refptr<CodecConfig> config) override;
void ReleaseMediaCodec(
......
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