Commit f5aa2651 authored by Vikas Soni's avatar Vikas Soni Committed by Commit Bot

Move vulkan_ycbcr_info.h to gpu/ipc/common.

Move the files to from gpu/vulkan/ to gpu/ipc/common/. This is
to avoid vulkan dependency and ifdefs at every place this struct
is used.

Bug: 948722
Change-Id: I065948a99b1ed0de92229173747711855e5ca63d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601642Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664096}
parent c63504e6
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")
import("//mojo/public/tools/bindings/mojom.gni") import("//mojo/public/tools/bindings/mojom.gni")
group("common") { group("common") {
...@@ -82,6 +81,8 @@ source_set("ipc_common_sources") { ...@@ -82,6 +81,8 @@ source_set("ipc_common_sources") {
"gpu_param_traits_macros.h", "gpu_param_traits_macros.h",
"memory_stats.cc", "memory_stats.cc",
"memory_stats.h", "memory_stats.h",
"vulkan_ycbcr_info.cc",
"vulkan_ycbcr_info.h",
] ]
if (is_mac) { if (is_mac) {
...@@ -249,8 +250,7 @@ source_set("struct_traits") { ...@@ -249,8 +250,7 @@ source_set("struct_traits") {
"//gpu/ipc/common", "//gpu/ipc/common",
"//mojo/public/cpp/bindings:bindings", "//mojo/public/cpp/bindings:bindings",
] ]
if (enable_vulkan) { if (is_android) {
sources += [ "vulkan_ycbcr_info_mojom_traits.h" ] sources += [ "vulkan_ycbcr_info_mojom_traits.h" ]
deps += [ "//gpu/vulkan:vulkan" ]
} }
} }
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# 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.
import("//gpu/vulkan/features.gni")
typemaps = [ typemaps = [
"//gpu/ipc/common/capabilities.typemap", "//gpu/ipc/common/capabilities.typemap",
"//gpu/ipc/common/context_result.typemap", "//gpu/ipc/common/context_result.typemap",
...@@ -16,8 +14,5 @@ typemaps = [ ...@@ -16,8 +14,5 @@ typemaps = [
"//gpu/ipc/common/memory_stats.typemap", "//gpu/ipc/common/memory_stats.typemap",
"//gpu/ipc/common/surface_handle.typemap", "//gpu/ipc/common/surface_handle.typemap",
"//gpu/ipc/common/sync_token.typemap", "//gpu/ipc/common/sync_token.typemap",
"//gpu/ipc/common/vulkan_ycbcr_info.typemap",
] ]
if (enable_vulkan) {
typemaps += [ "//gpu/ipc/common/vulkan_ycbcr_info.typemap" ]
}
...@@ -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.
#include "gpu/vulkan/vulkan_ycbcr_info.h" #include "gpu/ipc/common/vulkan_ycbcr_info.h"
namespace gpu { namespace gpu {
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
// 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.
#ifndef GPU_VULKAN_VULKAN_YCBCR_INFO_H_ #ifndef GPU_IPC_COMMON_VULKAN_YCBCR_INFO_H_
#define GPU_VULKAN_VULKAN_YCBCR_INFO_H_ #define GPU_IPC_COMMON_VULKAN_YCBCR_INFO_H_
#include <stdint.h> #include <stdint.h>
#include "gpu/vulkan/vulkan_export.h" #include "gpu/gpu_export.h"
namespace gpu { namespace gpu {
// Sampler Ycbcr conversion information. // Sampler Ycbcr conversion information.
struct VULKAN_EXPORT VulkanYCbCrInfo { struct GPU_EXPORT VulkanYCbCrInfo {
VulkanYCbCrInfo(); VulkanYCbCrInfo();
VulkanYCbCrInfo(uint32_t suggested_ycbcr_model, VulkanYCbCrInfo(uint32_t suggested_ycbcr_model,
uint32_t suggested_ycbcr_range, uint32_t suggested_ycbcr_range,
...@@ -55,4 +55,4 @@ struct VULKAN_EXPORT VulkanYCbCrInfo { ...@@ -55,4 +55,4 @@ struct VULKAN_EXPORT VulkanYCbCrInfo {
} // namespace gpu } // namespace gpu
#endif // GPU_VULKAN_VULKAN_YCBCR_INFO_H_ #endif // GPU_IPC_COMMON_VULKAN_YCBCR_INFO_H_
...@@ -8,7 +8,7 @@ module gpu.mojom; ...@@ -8,7 +8,7 @@ module gpu.mojom;
// enums defined in the vulkan api which are passed as uint32/uint64 over ipc. // enums defined in the vulkan api which are passed as uint32/uint64 over ipc.
// We use all of these values in an "opaque" way and don't consume it directly // We use all of these values in an "opaque" way and don't consume it directly
// in chrome. // in chrome.
// See gpu/vulkan/vulkan_ycbcr_info.h. // See gpu/ipc/common/vulkan_ycbcr_info.h.
struct VulkanYCbCrInfo { struct VulkanYCbCrInfo {
uint32 suggested_ycbcr_model; uint32 suggested_ycbcr_model;
uint32 suggested_ycbcr_range; uint32 suggested_ycbcr_range;
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
mojom = "//gpu/ipc/common/vulkan_ycbcr_info.mojom" mojom = "//gpu/ipc/common/vulkan_ycbcr_info.mojom"
public_headers = [ "//gpu/vulkan/vulkan_ycbcr_info.h" ] public_headers = [ "//gpu/ipc/common/vulkan_ycbcr_info.h" ]
traits_headers = [ "//gpu/ipc/common/vulkan_ycbcr_info_mojom_traits.h" ] traits_headers = [ "//gpu/ipc/common/vulkan_ycbcr_info_mojom_traits.h" ]
type_mappings = [ "gpu.mojom.VulkanYCbCrInfo=::gpu::VulkanYCbCrInfo" ] type_mappings = [ "gpu.mojom.VulkanYCbCrInfo=::gpu::VulkanYCbCrInfo" ]
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#ifndef GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_TRAITS_H_ #ifndef GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_TRAITS_H_
#define GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_TRAITS_H_ #define GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_TRAITS_H_
#include "gpu/ipc/common/vulkan_ycbcr_info.h"
#include "gpu/ipc/common/vulkan_ycbcr_info.mojom-shared.h" #include "gpu/ipc/common/vulkan_ycbcr_info.mojom-shared.h"
#include "gpu/vulkan/vulkan_ycbcr_info.h"
namespace mojo { namespace mojo {
......
...@@ -50,8 +50,6 @@ if (enable_vulkan) { ...@@ -50,8 +50,6 @@ if (enable_vulkan) {
"vulkan_swap_chain.h", "vulkan_swap_chain.h",
"vulkan_util.cc", "vulkan_util.cc",
"vulkan_util.h", "vulkan_util.h",
"vulkan_ycbcr_info.cc",
"vulkan_ycbcr_info.h",
] ]
configs += [ "//build/config:precompiled_headers" ] configs += [ "//build/config:precompiled_headers" ]
......
...@@ -24,6 +24,7 @@ component("android") { ...@@ -24,6 +24,7 @@ component("android") {
defines = [ "IS_VULKAN_ANDROID_IMPL" ] defines = [ "IS_VULKAN_ANDROID_IMPL" ]
deps = [ deps = [
"//gpu/ipc/common:common",
"//ui/gfx", "//ui/gfx",
] ]
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/logging.h" #include "base/logging.h"
#include "gpu/ipc/common/vulkan_ycbcr_info.h"
#include "gpu/vulkan/vulkan_device_queue.h" #include "gpu/vulkan/vulkan_device_queue.h"
#include "gpu/vulkan/vulkan_function_pointers.h" #include "gpu/vulkan/vulkan_function_pointers.h"
#include "gpu/vulkan/vulkan_instance.h" #include "gpu/vulkan/vulkan_instance.h"
#include "gpu/vulkan/vulkan_posix_util.h" #include "gpu/vulkan/vulkan_posix_util.h"
#include "gpu/vulkan/vulkan_surface.h" #include "gpu/vulkan/vulkan_surface.h"
#include "gpu/vulkan/vulkan_util.h" #include "gpu/vulkan/vulkan_util.h"
#include "gpu/vulkan/vulkan_ycbcr_info.h"
#include "ui/gfx/gpu_fence.h" #include "ui/gfx/gpu_fence.h"
#include "ui/gfx/gpu_memory_buffer.h" #include "ui/gfx/gpu_memory_buffer.h"
......
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