Commit d9f6e099 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

jda: move files from media/gpu to media/mojo

This CL moves the Jpeg decode accelerator-related files from their
locations in //media/gpu/ipc/{client,service} and //media/gpu/mojo
into //media/mojo/{clients,interfaces,services}.

This follows up on the TODOs in [1,2]. Most of the updates are fully
automatic using tools/git/mass-rename.py.

Bug: 699255

[1] https://cs.chromium.org/chromium/src/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h?dr&l=22
[2] https://cs.chromium.org/chromium/src/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h?dr&l=21

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: I0ed7f94f1bfc258756293cde6bdd228e6f0197c7
Reviewed-on: https://chromium-review.googlesource.com/778000Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Reviewed-by: default avatarChandan Padhi <c.padhi@samsung.com>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518419}
parent 100328a4
......@@ -34,10 +34,10 @@
#include "ipc/ipc_sync_channel.h"
#include "ipc/ipc_sync_message_filter.h"
#include "media/gpu/gpu_video_encode_accelerator_factory.h"
#include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h"
#include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
#include "media/gpu/ipc/service/gpu_video_encode_accelerator.h"
#include "media/gpu/ipc/service/media_gpu_channel_manager.h"
#include "media/mojo/services/gpu_jpeg_decode_accelerator.h"
#include "media/mojo/services/mojo_video_encode_accelerator_provider.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "ui/gl/gl_implementation.h"
......
......@@ -97,10 +97,10 @@ jumbo_source_set("browser") {
"//media:media_features",
"//media/capture",
"//media/capture/mojo:image_capture",
"//media/gpu/ipc/client",
"//media/midi",
"//media/midi:mojo",
"//media/mojo:features",
"//media/mojo/clients:jpeg_decode_accelerator",
"//media/mojo/interfaces",
"//media/mojo/interfaces:constants",
"//media/mojo/services",
......
......@@ -18,7 +18,7 @@
#include "content/common/content_export.h"
#include "gpu/config/gpu_info.h"
#include "media/capture/video/video_capture_jpeg_decoder.h"
#include "media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h"
#include "media/mojo/clients/gpu_jpeg_decode_accelerator_host.h"
namespace base {
class WaitableEvent;
......
......@@ -548,6 +548,7 @@ if (use_v4l2_codec || use_vaapi) {
"//media:test_support",
"//media/gpu",
"//media/gpu/ipc/service",
"//media/mojo/services",
"//testing/gtest",
"//third_party/libyuv",
"//ui/base",
......@@ -595,22 +596,3 @@ source_set("unit_tests") {
]
}
}
test("video_decode_accelerator_service_unittest") {
sources = [
"ipc/service/gpu_jpeg_decode_accelerator_unittest.cc",
]
deps = [
":gpu",
"//base",
"//base/test:test_support",
"//gpu:test_support",
"//media/gpu/ipc/common",
"//media/gpu/ipc/service",
"//media/test:run_all_unittests",
"//testing/gtest",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
]
}
......@@ -4,8 +4,6 @@
source_set("client") {
sources = [
"gpu_jpeg_decode_accelerator_host.cc",
"gpu_jpeg_decode_accelerator_host.h",
"gpu_video_decode_accelerator_host.cc",
"gpu_video_decode_accelerator_host.h",
"gpu_video_encode_accelerator_host.cc",
......@@ -22,7 +20,6 @@ source_set("client") {
"//media:media_features",
"//media/gpu",
"//media/gpu/ipc/common",
"//media/gpu/mojo:jpeg_decoder",
"//ui/gfx:memory_buffer",
"//ui/gfx/geometry",
"//ui/gfx/ipc",
......
......@@ -16,8 +16,6 @@ target(link_target_type, "service") {
]
sources = [
"gpu_jpeg_decode_accelerator.cc",
"gpu_jpeg_decode_accelerator.h",
"gpu_video_decode_accelerator.cc",
"gpu_video_decode_accelerator.h",
"gpu_video_encode_accelerator.cc",
......@@ -42,7 +40,6 @@ target(link_target_type, "service") {
"//media:media_features",
"//media/gpu:features",
"//media/gpu/ipc/common",
"//media/gpu/mojo:jpeg_decoder",
"//third_party/mesa:mesa_headers",
"//ui/gfx/ipc/color",
]
......
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
mojom("jpeg_decoder") {
sources = [
"jpeg_decoder.mojom",
]
deps = [
"//media/mojo/interfaces",
"//mojo/common:common_custom_types",
"//ui/gfx/geometry/mojo",
]
}
include_rules = [
"+mojo/common",
"+mojo/public",
]
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *_typemap_traits*.*=set noparent
per-file *_typemap_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
typemaps = [ "//media/gpu/mojo/jpeg_decoder.typemap" ]
......@@ -79,6 +79,21 @@ source_set("clients") {
}
}
source_set("jpeg_decode_accelerator") {
visibility = [ "//content/browser" ]
sources = [
"gpu_jpeg_decode_accelerator_host.cc",
"gpu_jpeg_decode_accelerator_host.h",
]
deps = [
"//base",
"//media/mojo/interfaces",
"//mojo/common",
]
}
source_set("unit_tests") {
testonly = true
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h"
#include "media/mojo/clients/gpu_jpeg_decode_accelerator_host.h"
#include <stddef.h>
......
......@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
#define MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
#ifndef MEDIA_MOJO_CLIENTS_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
#define MEDIA_MOJO_CLIENTS_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
#include <stdint.h>
#include <memory>
#include "base/macros.h"
#include "media/gpu/mojo/jpeg_decoder.mojom.h"
#include "media/mojo/interfaces/jpeg_decoder.mojom.h"
#include "media/video/jpeg_decode_accelerator.h"
namespace base {
......@@ -19,7 +19,7 @@ class SingleThreadTaskRunner;
namespace media {
// TODO(c.padhi): Move GpuJpegDecodeAcceleratorHost to media/gpu/mojo, see
// TODO(c.padhi): Rename to MojoJpegDecodeAccelerator, see
// http://crbug.com/699255.
// A JpegDecodeAccelerator, for use in the browser process, that proxies to a
// mojom::GpuJpegDecodeAccelerator. Created on the owner's thread, otherwise
......@@ -65,4 +65,4 @@ class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator {
} // namespace media
#endif // MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
#endif // MEDIA_MOJO_CLIENTS_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
......@@ -15,6 +15,7 @@ mojom("interfaces") {
"decryptor.mojom",
"demuxer_stream.mojom",
"interface_factory.mojom",
"jpeg_decoder.mojom",
"media_log.mojom",
"media_types.mojom",
"output_protection.mojom",
......
......@@ -32,6 +32,8 @@ struct BitstreamBuffer {
};
// GPU process interface exposed to the browser for decoding JPEG images.
// TODO(mcasas): Rename this interface to JpegDecodeAccelerator (and the file
// accordingly), https://crbug.com/699255
interface GpuJpegDecodeAccelerator {
// Initializes the JPEG decoder. Should be called once per decoder
// construction and before using Decode(). This call returns true if
......
......@@ -2,17 +2,17 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//media/gpu/mojo/jpeg_decoder.mojom"
mojom = "//media/mojo/interfaces/jpeg_decoder.mojom"
public_headers = [
"//media/base/bitstream_buffer.h",
"//media/video/jpeg_decode_accelerator.h",
]
traits_headers = [ "//media/gpu/mojo/jpeg_decoder_typemap_traits.h" ]
traits_headers = [ "//media/mojo/interfaces/jpeg_decoder_typemap_traits.h" ]
sources = [
"//media/gpu/mojo/jpeg_decoder_typemap_traits.cc",
"//media/mojo/interfaces/jpeg_decoder_typemap_traits.cc",
]
deps = [
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/mojo/jpeg_decoder_typemap_traits.h"
#include "media/mojo/interfaces/jpeg_decoder_typemap_traits.h"
#include "base/logging.h"
#include "media/base/ipc/media_param_traits_macros.h"
......
......@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_MOJO_JPEG_DECODER_TYPEMAP_TRAITS_H_
#define MEDIA_GPU_MOJO_JPEG_DECODER_TYPEMAP_TRAITS_H_
#ifndef MEDIA_MOJO_INTERFACES_JPEG_DECODER_TYPEMAP_TRAITS_H_
#define MEDIA_MOJO_INTERFACES_JPEG_DECODER_TYPEMAP_TRAITS_H_
#include "base/numerics/safe_conversions.h"
#include "media/base/bitstream_buffer.h"
#include "media/gpu/mojo/jpeg_decoder.mojom.h"
#include "media/mojo/interfaces/jpeg_decoder.mojom.h"
#include "media/video/jpeg_decode_accelerator.h"
namespace mojo {
......@@ -61,4 +61,4 @@ struct StructTraits<media::mojom::BitstreamBufferDataView,
} // namespace mojo
#endif // MEDIA_GPU_MOJO_JPEG_DECODER_TYPEMAP_TRAITS_H_
#endif // MEDIA_MOJO_INTERFACES_JPEG_DECODER_TYPEMAP_TRAITS_H_
......@@ -10,6 +10,7 @@ typemaps = [
"//media/mojo/interfaces/demuxer_stream.typemap",
"//media/mojo/interfaces/encryption_scheme.typemap",
"//media/mojo/interfaces/hdr_metadata.typemap",
"//media/mojo/interfaces/jpeg_decoder.typemap",
"//media/mojo/interfaces/media_types.typemap",
"//media/mojo/interfaces/pipeline_statistics.typemap",
"//media/mojo/interfaces/video_color_space.typemap",
......
......@@ -12,6 +12,8 @@ import("//testing/test.gni")
component("services") {
output_name = "media_mojo_services"
sources = [
"gpu_jpeg_decode_accelerator.cc",
"gpu_jpeg_decode_accelerator.h",
"gpu_mojo_media_client.cc",
"gpu_mojo_media_client.h",
"interface_factory_impl.cc",
......@@ -221,6 +223,7 @@ source_set("unit_tests") {
testonly = true
sources = [
"gpu_jpeg_decode_accelerator_unittest.cc",
"mojo_audio_input_stream_unittest.cc",
"mojo_audio_output_stream_unittest.cc",
"mojo_video_encode_accelerator_service_unittest.cc",
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h"
#include "media/mojo/services/gpu_jpeg_decode_accelerator.h"
#include <stdint.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 MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
#define MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
#ifndef MEDIA_MOJO_SERVICES_GPU_JPEG_DECODE_ACCELERATOR_H_
#define MEDIA_MOJO_SERVICES_GPU_JPEG_DECODE_ACCELERATOR_H_
#include <stdint.h>
......@@ -13,17 +13,19 @@
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "media/gpu/gpu_jpeg_decode_accelerator_factory.h"
#include "media/gpu/mojo/jpeg_decoder.mojom.h"
#include "media/mojo/interfaces/jpeg_decoder.mojom.h"
#include "media/mojo/services/media_mojo_export.h"
#include "media/video/jpeg_decode_accelerator.h"
namespace media {
// TODO(c.padhi): Move GpuJpegDecodeAccelerator to media/gpu/mojo, see
// TODO(c.padhi): Rename to MojoJpegDecodeAcceleratorService, see
// http://crbug.com/699255.
// Implementation of a mojom::GpuJpegDecodeAccelerator which runs in the GPU
// process, and wraps a JpegDecodeAccelerator.
class GpuJpegDecodeAccelerator : public mojom::GpuJpegDecodeAccelerator,
public JpegDecodeAccelerator::Client {
class MEDIA_MOJO_EXPORT GpuJpegDecodeAccelerator
: public mojom::GpuJpegDecodeAccelerator,
public JpegDecodeAccelerator::Client {
public:
static void Create(mojom::GpuJpegDecodeAcceleratorRequest request);
......@@ -66,4 +68,4 @@ class GpuJpegDecodeAccelerator : public mojom::GpuJpegDecodeAccelerator,
} // namespace media
#endif // MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
#endif // MEDIA_MOJO_SERVICES_GPU_JPEG_DECODE_ACCELERATOR_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h"
#include "media/mojo/services/gpu_jpeg_decode_accelerator.h"
#include "base/bind.h"
#include "base/command_line.h"
......
......@@ -22,7 +22,6 @@ _typemap_imports = [
"//extensions/common/typemaps.gni",
"//gpu/ipc/common/typemaps.gni",
"//media/capture/mojo/typemaps.gni",
"//media/gpu/mojo/typemaps.gni",
"//media/mojo/interfaces/typemaps.gni",
"//mojo/common/typemaps.gni",
"//mojo/public/cpp/bindings/tests/chromium_typemaps.gni",
......
......@@ -35,7 +35,6 @@ mojom("interfaces") {
public_deps = [
":constants",
"//gpu/ipc/common:interfaces",
"//media/gpu/mojo:jpeg_decoder",
"//media/mojo/interfaces",
"//mojo/common:common_custom_types",
"//services/ui/public/interfaces/cursor",
......
......@@ -7,7 +7,7 @@ module ui.mojom;
import "gpu/ipc/common/gpu_feature_info.mojom";
import "gpu/ipc/common/gpu_info.mojom";
import "gpu/ipc/common/sync_token.mojom";
import "media/gpu/mojo/jpeg_decoder.mojom";
import "media/mojo/interfaces/jpeg_decoder.mojom";
import "media/mojo/interfaces/video_encode_accelerator.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "ui/gfx/mojo/buffer_types.mojom";
......
......@@ -14,7 +14,6 @@ mojom("gl") {
public_deps = [
"//components/arc/common:media",
"//gpu/ipc/common:interfaces",
"//media/gpu/mojo:jpeg_decoder",
"//media/mojo/interfaces",
"//ui/gfx/geometry/mojo",
"//ui/gfx/mojo",
......
......@@ -11,7 +11,7 @@ import "gpu/ipc/common/gpu_info.mojom";
import "gpu/ipc/common/memory_stats.mojom";
import "gpu/ipc/common/surface_handle.mojom";
import "gpu/ipc/common/sync_token.mojom";
import "media/gpu/mojo/jpeg_decoder.mojom";
import "media/mojo/interfaces/jpeg_decoder.mojom";
import "media/mojo/interfaces/video_encode_accelerator.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "ui/gfx/mojo/buffer_types.mojom";
......
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