Commit 410c6df8 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

Deprecate IPC and GpuArcVDA

Deprecate current ArcVideoDecodeAccelerator IPC and GpuArcVDA

This CL is the first phase of the migration to a new IPC for ARC
VideoDecodeAccelerator.

To maintain backwards-compatibility during the transition period,
the existing VideoDecodeAccelerator mojo interface is renamed to
VideoDecodeAcceleratorDeprecated,
and its implementation, GpuArcVideoDecodeAccelerator,
to GpuArcVideoDecodeAcceleratorDeprecated.

TEST=CTS MediaTest on veyron_minnie and eve
TEST=CTS MediaTest with --mus on veyron_minnie and eve
TEST=Secure Playback test using ExoPlayer
BUG=chromium:745457

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I591626d651d1b7bed0a03f55fdc64dae93d196c9
Reviewed-on: https://chromium-review.googlesource.com/609564
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Reviewed-by: default avatarJorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarLuis Hector Chavez <lhchavez@chromium.org>
Reviewed-by: default avatarOwen Lin <owenlin@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523308}
parent 5cbb45ec
......@@ -5,8 +5,8 @@
"provides": {
"browser": [
"arc::mojom::ProtectedBufferManager",
"arc::mojom::VideoDecodeAccelerator",
"arc::mojom::VideoDecodeClient",
"arc::mojom::VideoDecodeAcceleratorDeprecated",
"arc::mojom::VideoDecodeClientDeprecated",
"arc::mojom::VideoEncodeAccelerator",
"arc::mojom::VideoEncodeClient",
"chrome::mojom::ResourceUsageReporter",
......
......@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/ash_config.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_browser_context_keyed_service_factory_base.h"
#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/gpu_service_registry.h"
#include "content/public/common/service_manager_connection.h"
......@@ -54,13 +55,13 @@ class VideoAcceleratorFactoryService : public mojom::VideoAcceleratorFactory {
~VideoAcceleratorFactoryService() override = default;
void CreateDecodeAccelerator(
mojom::VideoDecodeAcceleratorRequest request) override {
void CreateDecodeAcceleratorDeprecated(
mojom::VideoDecodeAcceleratorDeprecatedRequest request) override {
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
base::BindOnce(
&content::BindInterfaceInGpuProcess<mojom::VideoDecodeAccelerator>,
std::move(request)));
base::BindOnce(&content::BindInterfaceInGpuProcess<
mojom::VideoDecodeAcceleratorDeprecated>,
std::move(request)));
}
void CreateEncodeAccelerator(
......@@ -91,10 +92,10 @@ class VideoAcceleratorFactoryServiceMus
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
void CreateDecodeAccelerator(
mojom::VideoDecodeAcceleratorRequest request) override {
void CreateDecodeAcceleratorDeprecated(
mojom::VideoDecodeAcceleratorDeprecatedRequest request) override {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
arc_->CreateVideoDecodeAccelerator(std::move(request));
arc_->CreateVideoDecodeAcceleratorDeprecated(std::move(request));
}
void CreateEncodeAccelerator(
......
......@@ -19,7 +19,7 @@
#include "services/service_manager/public/cpp/connector.h"
#if defined(OS_CHROMEOS)
#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h"
#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h"
#include "components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h"
#include "components/arc/video_accelerator/protected_buffer_manager.h"
#include "components/arc/video_accelerator/protected_buffer_manager_proxy.h"
......@@ -61,8 +61,9 @@ void ChromeContentGpuClient::InitializeRegistry(
service_manager::BinderRegistry* registry) {
#if defined(OS_CHROMEOS)
registry->AddInterface(
base::Bind(&ChromeContentGpuClient::CreateArcVideoDecodeAccelerator,
base::Unretained(this)),
base::Bind(
&ChromeContentGpuClient::CreateArcVideoDecodeAcceleratorDeprecated,
base::Unretained(this)),
base::ThreadTaskRunnerHandle::Get());
registry->AddInterface(
base::Bind(&ChromeContentGpuClient::CreateArcVideoEncodeAccelerator,
......@@ -94,10 +95,10 @@ void ChromeContentGpuClient::GpuServiceInitialized(
}
#if defined(OS_CHROMEOS)
void ChromeContentGpuClient::CreateArcVideoDecodeAccelerator(
::arc::mojom::VideoDecodeAcceleratorRequest request) {
void ChromeContentGpuClient::CreateArcVideoDecodeAcceleratorDeprecated(
::arc::mojom::VideoDecodeAcceleratorDeprecatedRequest request) {
mojo::MakeStrongBinding(
std::make_unique<arc::GpuArcVideoDecodeAccelerator>(
std::make_unique<arc::GpuArcVideoDecodeAcceleratorDeprecated>(
gpu_preferences_, protected_buffer_manager_.get()),
std::move(request));
}
......
......@@ -13,7 +13,7 @@
#if defined(OS_CHROMEOS)
#include "components/arc/common/protected_buffer_manager.mojom.h"
#include "components/arc/common/video_decode_accelerator.mojom.h"
#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
#include "components/arc/common/video_encode_accelerator.mojom.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
......@@ -34,8 +34,8 @@ class ChromeContentGpuClient : public content::ContentGpuClient {
private:
#if defined(OS_CHROMEOS)
void CreateArcVideoDecodeAccelerator(
::arc::mojom::VideoDecodeAcceleratorRequest request);
void CreateArcVideoDecodeAcceleratorDeprecated(
::arc::mojom::VideoDecodeAcceleratorDeprecatedRequest request);
void CreateArcVideoEncodeAccelerator(
::arc::mojom::VideoEncodeAcceleratorRequest request);
......
......@@ -65,7 +65,7 @@ mojom("media") {
"protected_buffer_manager.mojom",
"video.mojom",
"video_common.mojom",
"video_decode_accelerator.mojom",
"video_decode_accelerator_deprecated.mojom",
"video_encode_accelerator.mojom",
]
......
......@@ -6,7 +6,7 @@
module arc.mojom;
import "video_decode_accelerator.mojom";
import "video_decode_accelerator_deprecated.mojom";
import "video_encode_accelerator.mojom";
// Deprecated method IDs: 0
......@@ -31,7 +31,7 @@ interface VideoInstance {
// Next method ID: 2
interface VideoAcceleratorFactory {
CreateDecodeAccelerator@0(VideoDecodeAccelerator& decoder);
CreateDecodeAcceleratorDeprecated@0(VideoDecodeAcceleratorDeprecated& video_decoder);
[MinVersion=1]
CreateEncodeAccelerator@1(VideoEncodeAccelerator& encoder);
......
......@@ -5,7 +5,7 @@
#ifndef COMPONENTS_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_
#define COMPONENTS_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_
#include "components/arc/common/video_decode_accelerator.mojom.h"
#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
#include "components/arc/video_accelerator/video_frame_plane.h"
#include "ui/gfx/geometry/size.h"
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
// This file defined the mojo interface between Android and Chromium for video
// decoding. See comments of VideoDecodeAccelerator for more info.
// decoding. See comments of VideoDecodeAcceleratorDeprecated for more info.
module arc.mojom;
......@@ -41,7 +41,7 @@ struct VideoFormat {
};
// Next MinVersion: 2
struct VideoDecodeAcceleratorConfig {
struct VideoDecodeAcceleratorConfigDeprecated {
// Deprecated. This config struct is used for decoder only.
enum DeviceTypeDeprecated {
DEVICE_ENCODER = 0,
......@@ -58,7 +58,7 @@ struct VideoDecodeAcceleratorConfig {
// Next MinVersion: 5
// Deprecated method IDs: 2, 7
// Next method ID: 11
interface VideoDecodeAccelerator {
interface VideoDecodeAcceleratorDeprecated {
enum Result {
SUCCESS = 0,
ILLEGAL_STATE = 1,
......@@ -69,8 +69,8 @@ interface VideoDecodeAccelerator {
};
[MinVersion=2]
Initialize@8(VideoDecodeAcceleratorConfig config,
VideoDecodeClient client) => (Result result);
Initialize@8(VideoDecodeAcceleratorConfigDeprecated config,
VideoDecodeClientDeprecated client) => (Result result);
[MinVersion=4]
AllocateProtectedBuffer@10(PortType port, uint32 index, handle handle_fd,
......@@ -94,8 +94,8 @@ interface VideoDecodeAccelerator {
// Deprecated method IDs: 0
// Next method ID: 6
interface VideoDecodeClient {
OnError@1(VideoDecodeAccelerator.Result error);
interface VideoDecodeClientDeprecated {
OnError@1(VideoDecodeAcceleratorDeprecated.Result error);
OnBufferDone@2(PortType port, uint32 index, BufferMetadata metadata);
......
......@@ -4,11 +4,11 @@
static_library("video_accelerator") {
sources = [
"arc_video_decode_accelerator.h",
"chrome_arc_video_decode_accelerator.cc",
"chrome_arc_video_decode_accelerator.h",
"gpu_arc_video_decode_accelerator.cc",
"gpu_arc_video_decode_accelerator.h",
"arc_video_decode_accelerator_deprecated.h",
"chrome_arc_video_decode_accelerator_deprecated.cc",
"chrome_arc_video_decode_accelerator_deprecated.h",
"gpu_arc_video_decode_accelerator_deprecated.cc",
"gpu_arc_video_decode_accelerator_deprecated.h",
"gpu_arc_video_encode_accelerator.cc",
"gpu_arc_video_encode_accelerator.h",
"protected_buffer_manager.cc",
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_H_
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#include <vector>
......@@ -53,7 +53,7 @@ struct VideoFormat {
// The IPC interface between Android and Chromium for video decoding. Input
// buffers are sent from Android side and get processed in Chromium and the
// output buffers are returned back to Android side.
class ArcVideoDecodeAccelerator {
class ArcVideoDecodeAcceleratorDeprecated {
public:
enum Result {
// Note: this enum is used for UMA reporting. The existing values should not
......@@ -77,8 +77,8 @@ class ArcVideoDecodeAccelerator {
// format of each VDA on Chromium is supported.
};
// The callbacks of the ArcVideoDecodeAccelerator. The user of this class
// should implement this interface.
// The callbacks of the ArcVideoDecodeAcceleratorDeprecated.
// The user of this class should implement this interface.
class Client {
public:
virtual ~Client() {}
......@@ -107,9 +107,10 @@ class ArcVideoDecodeAccelerator {
virtual void OnFlushDone() = 0;
};
// Initializes the ArcVideoDecodeAccelerator with specific configuration. This
// must be called before any other methods. This call is synchronous and
// returns SUCCESS iff initialization is successful.
// Initializes the ArcVideoDecodeAcceleratorDeprecated with
// specific configuration. This must be called before any other methods.
// This call is synchronous and returns SUCCESS
// iff initialization is successful.
virtual Result Initialize(const Config& config, Client* client) = 0;
// Allocates a new protected buffer on accelerator side for the given |port|
......@@ -174,9 +175,9 @@ class ArcVideoDecodeAccelerator {
// called.
virtual void Flush() = 0;
virtual ~ArcVideoDecodeAccelerator() {}
virtual ~ArcVideoDecodeAcceleratorDeprecated() {}
};
} // namespace arc
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_H_
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_H_
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#include <list>
#include <memory>
......@@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/threading/thread_checker.h"
#include "components/arc/video_accelerator/arc_video_decode_accelerator.h"
#include "components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
#include "media/video/video_decode_accelerator.h"
......@@ -23,22 +23,22 @@ class ProtectedBufferHandle;
// This class is executed in the GPU process. It takes decoding requests from
// ARC via IPC channels and translates and sends those requests to an
// implementation of media::VideoDecodeAccelerator. It also returns the decoded
// frames back to the ARC side.
class ChromeArcVideoDecodeAccelerator
: public ArcVideoDecodeAccelerator,
// implementation of media::VideoDecodeAcceleratorDeprecated.
// It also returns the decoded frames back to the ARC side.
class ChromeArcVideoDecodeAcceleratorDeprecated
: public ArcVideoDecodeAcceleratorDeprecated,
public media::VideoDecodeAccelerator::Client,
public base::SupportsWeakPtr<ChromeArcVideoDecodeAccelerator> {
public base::SupportsWeakPtr<ChromeArcVideoDecodeAcceleratorDeprecated> {
public:
ChromeArcVideoDecodeAccelerator(
ChromeArcVideoDecodeAcceleratorDeprecated(
const gpu::GpuPreferences& gpu_preferences,
ProtectedBufferManager* protected_buffer_manager);
~ChromeArcVideoDecodeAccelerator() override;
~ChromeArcVideoDecodeAcceleratorDeprecated() override;
// Implementation of the ArcVideoDecodeAccelerator interface.
ArcVideoDecodeAccelerator::Result Initialize(
// Implementation of the ArcVideoDecodeAcceleratorDeprecated interface.
ArcVideoDecodeAcceleratorDeprecated::Result Initialize(
const Config& config,
ArcVideoDecodeAccelerator::Client* client) override;
ArcVideoDecodeAcceleratorDeprecated::Client* client) override;
void SetNumberOfOutputBuffers(size_t number) override;
bool AllocateProtectedBuffer(PortType port,
uint32_t index,
......@@ -119,9 +119,9 @@ class ChromeArcVideoDecodeAccelerator
};
// The helper method to simplify reporting of the status returned to UMA.
ArcVideoDecodeAccelerator::Result InitializeTask(
ArcVideoDecodeAcceleratorDeprecated::Result InitializeTask(
const Config& config,
ArcVideoDecodeAccelerator::Client* client);
ArcVideoDecodeAcceleratorDeprecated::Client* client);
// Helper function to validate |port| and |index|.
bool ValidatePortAndIndex(PortType port, uint32_t index) const;
......@@ -153,8 +153,8 @@ class ChromeArcVideoDecodeAccelerator
std::unique_ptr<media::VideoDecodeAccelerator> vda_;
// It's safe to use the pointer here, the life cycle of the |arc_client_|
// is longer than this ChromeArcVideoDecodeAccelerator.
ArcVideoDecodeAccelerator::Client* arc_client_;
// is longer than this ChromeArcVideoDecodeAcceleratorDeprecated.
ArcVideoDecodeAcceleratorDeprecated::Client* arc_client_;
// The next ID for the bitstream buffer, started from 0.
int32_t next_bitstream_buffer_id_;
......@@ -186,9 +186,9 @@ class ChromeArcVideoDecodeAccelerator
gpu::GpuPreferences gpu_preferences_;
ProtectedBufferManager* protected_buffer_manager_;
DISALLOW_COPY_AND_ASSIGN(ChromeArcVideoDecodeAccelerator);
DISALLOW_COPY_AND_ASSIGN(ChromeArcVideoDecodeAcceleratorDeprecated);
};
} // namespace arc
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_H_
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_CHROME_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_H_
#ifndef COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#define COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
#include <memory>
#include <vector>
......@@ -11,8 +11,8 @@
#include "base/files/scoped_file.h"
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "components/arc/common/video_decode_accelerator.mojom.h"
#include "components/arc/video_accelerator/arc_video_decode_accelerator.h"
#include "components/arc/common/video_decode_accelerator_deprecated.mojom.h"
#include "components/arc/video_accelerator/arc_video_decode_accelerator_deprecated.h"
#include "components/arc/video_accelerator/video_frame_plane.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
......@@ -20,23 +20,23 @@ namespace arc {
class ProtectedBufferManager;
// GpuArcVideoDecodeAccelerator manages life-cycle and IPC message translation
// for ArcVideoDecodeAccelerator.
// GpuArcVideoDecodeAcceleratorDeprecated manages life-cycle
// and IPC message translation for ArcVideoDecodeAcceleratorDeprecated.
//
// For each creation request from GpuArcVideoDecodeAcceleratorHost,
// GpuArcVideoDecodeAccelerator will create a new IPC channel.
class GpuArcVideoDecodeAccelerator
: public ::arc::mojom::VideoDecodeAccelerator,
public ArcVideoDecodeAccelerator::Client {
// GpuArcVideoDecodeAcceleratorDeprecated will create a new IPC channel.
class GpuArcVideoDecodeAcceleratorDeprecated
: public ::arc::mojom::VideoDecodeAcceleratorDeprecated,
public ArcVideoDecodeAcceleratorDeprecated::Client {
public:
GpuArcVideoDecodeAccelerator(
GpuArcVideoDecodeAcceleratorDeprecated(
const gpu::GpuPreferences& gpu_preferences,
ProtectedBufferManager* protected_buffer_manager);
~GpuArcVideoDecodeAccelerator() override;
~GpuArcVideoDecodeAcceleratorDeprecated() override;
private:
// ArcVideoDecodeAccelerator::Client implementation.
void OnError(ArcVideoDecodeAccelerator::Result error) override;
// ArcVideoDecodeAcceleratorDeprecated::Client implementation.
void OnError(ArcVideoDecodeAcceleratorDeprecated::Result error) override;
void OnBufferDone(PortType port,
uint32_t index,
const BufferMetadata& metadata) override;
......@@ -44,18 +44,17 @@ class GpuArcVideoDecodeAccelerator
void OnResetDone() override;
void OnOutputFormatChanged(const VideoFormat& format) override;
// ::arc::mojom::VideoDecodeAccelerator implementation.
void Initialize(::arc::mojom::VideoDecodeAcceleratorConfigPtr config,
::arc::mojom::VideoDecodeClientPtr client,
InitializeCallback callback) override;
// ::arc::mojom::VideoDecodeAcceleratorDeprecated implementation.
void Initialize(
::arc::mojom::VideoDecodeAcceleratorConfigDeprecatedPtr config,
::arc::mojom::VideoDecodeClientDeprecatedPtr client,
InitializeCallback callback) override;
void AllocateProtectedBuffer(
::arc::mojom::PortType port,
uint32_t index,
mojo::ScopedHandle handle,
uint64_t size,
AllocateProtectedBufferCallback callback) override;
void BindSharedMemory(::arc::mojom::PortType port,
uint32_t index,
mojo::ScopedHandle ashmem_handle,
......@@ -77,12 +76,13 @@ class GpuArcVideoDecodeAccelerator
THREAD_CHECKER(thread_checker_);
gpu::GpuPreferences gpu_preferences_;
std::unique_ptr<ArcVideoDecodeAccelerator> accelerator_;
::arc::mojom::VideoDecodeClientPtr client_;
DISALLOW_COPY_AND_ASSIGN(GpuArcVideoDecodeAccelerator);
std::unique_ptr<ArcVideoDecodeAcceleratorDeprecated> accelerator_;
::arc::mojom::VideoDecodeClientDeprecatedPtr client_;
DISALLOW_COPY_AND_ASSIGN(GpuArcVideoDecodeAcceleratorDeprecated);
};
} // namespace arc
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_H_
#endif // COMPONENTS_ARC_VIDEO_ACCELERATOR_GPU_ARC_VIDEO_DECODE_ACCELERATOR_DEPRECATED_H_
......@@ -59,8 +59,9 @@ class TestGpuService : public mojom::GpuService {
void CloseChannel(int32_t client_id) override {}
void CreateArcVideoDecodeAccelerator(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) override {}
void CreateArcVideoDecodeAcceleratorDeprecated(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request)
override {}
void CreateArcVideoEncodeAccelerator(
arc::mojom::VideoEncodeAcceleratorRequest vea_request) override {}
......
......@@ -52,7 +52,7 @@
#endif
#if defined(OS_CHROMEOS)
#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h"
#include "components/arc/video_accelerator/gpu_arc_video_decode_accelerator_deprecated.h"
#include "components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h"
#include "components/arc/video_accelerator/protected_buffer_manager.h"
#include "components/arc/video_accelerator/protected_buffer_manager_proxy.h"
......@@ -240,15 +240,15 @@ void GpuServiceImpl::RecordLogMessage(int severity,
(*gpu_host_)->RecordLogMessage(severity, header, message);
}
void GpuServiceImpl::CreateArcVideoDecodeAccelerator(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
void GpuServiceImpl::CreateArcVideoDecodeAcceleratorDeprecated(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
#if defined(OS_CHROMEOS)
DCHECK(io_runner_->BelongsToCurrentThread());
main_runner_->PostTask(
FROM_HERE,
base::BindOnce(
&GpuServiceImpl::CreateArcVideoDecodeAcceleratorOnMainThread,
weak_ptr_, std::move(vda_request)));
base::BindOnce(&GpuServiceImpl::
CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread,
weak_ptr_, std::move(vda_request)));
#else
NOTREACHED();
#endif // defined(OS_CHROMEOS)
......@@ -283,11 +283,11 @@ void GpuServiceImpl::CreateArcProtectedBufferManager(
}
#if defined(OS_CHROMEOS)
void GpuServiceImpl::CreateArcVideoDecodeAcceleratorOnMainThread(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
void GpuServiceImpl::CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
DCHECK(main_runner_->BelongsToCurrentThread());
mojo::MakeStrongBinding(
std::make_unique<arc::GpuArcVideoDecodeAccelerator>(
std::make_unique<arc::GpuArcVideoDecodeAcceleratorDeprecated>(
gpu_preferences_, protected_buffer_manager_.get()),
std::move(vda_request));
}
......
......@@ -140,8 +140,8 @@ class VIZ_SERVICE_EXPORT GpuServiceImpl : public gpu::GpuChannelManagerDelegate,
bool is_gpu_host,
EstablishGpuChannelCallback callback) override;
void CloseChannel(int32_t client_id) override;
void CreateArcVideoDecodeAccelerator(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) override;
void CreateArcVideoDecodeAcceleratorDeprecated(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) override;
void CreateArcVideoEncodeAccelerator(
arc::mojom::VideoEncodeAcceleratorRequest vea_request) override;
void CreateArcProtectedBufferManager(
......@@ -177,8 +177,8 @@ class VIZ_SERVICE_EXPORT GpuServiceImpl : public gpu::GpuChannelManagerDelegate,
void Stop(StopCallback callback) override;
#if defined(OS_CHROMEOS)
void CreateArcVideoDecodeAcceleratorOnMainThread(
arc::mojom::VideoDecodeAcceleratorRequest vda_request);
void CreateArcVideoDecodeAcceleratorDeprecatedOnMainThread(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request);
void CreateArcVideoEncodeAcceleratorOnMainThread(
arc::mojom::VideoEncodeAcceleratorRequest vea_request);
void CreateArcProtectedBufferManagerOnMainThread(
......
......@@ -5,12 +5,13 @@
module ui.mojom;
import "components/arc/common/protected_buffer_manager.mojom";
import "components/arc/common/video_decode_accelerator.mojom";
import "components/arc/common/video_decode_accelerator_deprecated.mojom";
import "components/arc/common/video_encode_accelerator.mojom";
interface Arc {
// Create a new VideoDecodeAccelerator and binds it to |vda|.
CreateVideoDecodeAccelerator(arc.mojom.VideoDecodeAccelerator& vda);
// Create a new VideoDecodeAcceleratorDepreacted and binds it to |vda|.
CreateVideoDecodeAcceleratorDeprecated(
arc.mojom.VideoDecodeAcceleratorDeprecated& vda);
// Create a new VideoEncodeAccelerator and binds it to |vea|.
CreateVideoEncodeAccelerator(arc.mojom.VideoEncodeAccelerator& vea);
......
......@@ -15,9 +15,10 @@ ArcClient::ArcClient(viz::mojom::GpuService* gpu_service)
ArcClient::~ArcClient() {}
// mojom::Arc overrides:
void ArcClient::CreateVideoDecodeAccelerator(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) {
gpu_service_->CreateArcVideoDecodeAccelerator(std::move(vda_request));
void ArcClient::CreateVideoDecodeAcceleratorDeprecated(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) {
gpu_service_->CreateArcVideoDecodeAcceleratorDeprecated(
std::move(vda_request));
}
void ArcClient::CreateVideoEncodeAccelerator(
......
......@@ -25,8 +25,8 @@ class ArcClient : public mojom::Arc {
private:
// mojom::Arc overrides:
void CreateVideoDecodeAccelerator(
arc::mojom::VideoDecodeAcceleratorRequest vda_request) override;
void CreateVideoDecodeAcceleratorDeprecated(
arc::mojom::VideoDecodeAcceleratorDeprecatedRequest vda_request) override;
void CreateVideoEncodeAccelerator(
arc::mojom::VideoEncodeAcceleratorRequest vea_request) override;
void CreateProtectedBufferManager(
......
......@@ -5,7 +5,7 @@
module viz.mojom;
import "components/arc/common/protected_buffer_manager.mojom";
import "components/arc/common/video_decode_accelerator.mojom";
import "components/arc/common/video_decode_accelerator_deprecated.mojom";
import "components/arc/common/video_encode_accelerator.mojom";
import "gpu/ipc/common/gpu_info.mojom";
import "gpu/ipc/common/memory_stats.mojom";
......@@ -28,8 +28,9 @@ interface GpuService {
// If no channel can be identified, do nothing.
CloseChannel(int32 client_id);
// Create a new ARC VideoDecodeAccelerator and binds it to |vda|.
CreateArcVideoDecodeAccelerator(arc.mojom.VideoDecodeAccelerator& vda);
// Create a new ARC VideoDecodeAcceleratorDeprecated and binds it to |vda|.
CreateArcVideoDecodeAcceleratorDeprecated(
arc.mojom.VideoDecodeAcceleratorDeprecated& vda);
// Create a new ARC VideoEncodeAccelerator and binds it to |vea|.
CreateArcVideoEncodeAccelerator(arc.mojom.VideoEncodeAccelerator& vea);
......
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