gecko-dev/dom/webgpu/moz.build
Jamie Nicol 73fc486eb6 Bug 1975457 - Rename webgpu::ExternalTexture to SharedTexture. r=webgpu-reviewers,nical
An ExternalTexture is a texture that is created and owned by gecko,
but shared with the webgpu implementation. It is used for webgpu
presentation. While this name describes the class well, it is
confusing due to webgpu having an entirely unrelated concept of
GPUExternalTexture.

This patch renames ExternalTexture, and all of its subclasses and
uses, to SharedTexture. This still describes the purpose accurately,
and has similarities to gl::SharedSurface which serves a similar
purpose for our webgl implementation.

Differential Revision: https://phabricator.services.mozilla.com/D255976
2025-07-03 19:02:24 +00:00

116 lines
2.7 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Core", "Graphics: WebGPU")
MOCHITEST_MANIFESTS += [
"tests/mochitest/mochitest-disabled.toml",
"tests/mochitest/mochitest-no-pref.toml",
"tests/mochitest/mochitest-resistfingerprinting.toml",
"tests/mochitest/mochitest.toml",
"tests/mochitest/perftest.toml",
]
REFTEST_MANIFESTS += ["tests/reftest/reftest.list"]
DIRS += []
h_and_cpp = [
"Adapter",
"BindGroup",
"BindGroupLayout",
"Buffer",
"CanvasContext",
"CommandBuffer",
"CommandEncoder",
"CompilationInfo",
"CompilationMessage",
"ComputePassEncoder",
"ComputePipeline",
"Device",
"DeviceLostInfo",
"Error",
"ExternalTexture",
"Instance",
"InternalError",
"ObjectModel",
"OutOfMemoryError",
"PipelineError",
"PipelineLayout",
"QuerySet",
"Queue",
"RenderBundle",
"RenderBundleEncoder",
"RenderPassEncoder",
"RenderPipeline",
"Sampler",
"ShaderModule",
"SharedTexture",
"SupportedFeatures",
"SupportedLimits",
"Texture",
"TextureView",
"Utility",
"ValidationError",
]
EXPORTS.mozilla.webgpu += [x + ".h" for x in h_and_cpp]
UNIFIED_SOURCES += [x + ".cpp" for x in h_and_cpp]
IPDL_SOURCES += [
"ipc/PWebGPU.ipdl",
"ipc/PWebGPUTypes.ipdlh",
]
EXPORTS.mozilla.webgpu += [
"ipc/WebGPUChild.h",
"ipc/WebGPUParent.h",
"ipc/WebGPUSerialize.h",
"ipc/WebGPUTypes.h",
]
UNIFIED_SOURCES += [
"ipc/WebGPUChild.cpp",
"ipc/WebGPUParent.cpp",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
EXPORTS.mozilla.webgpu += [
"SharedTextureD3D11.h",
]
UNIFIED_SOURCES += [
"SharedTextureD3D11.cpp",
]
if CONFIG["OS_TARGET"] == "Linux":
EXPORTS.mozilla.webgpu += [
"SharedTextureDMABuf.h",
]
UNIFIED_SOURCES += [
"SharedTextureDMABuf.cpp",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"):
EXPORTS.mozilla.webgpu += [
"SharedTextureMacIOSurface.h",
]
UNIFIED_SOURCES += [
"SharedTextureMacIOSurface.cpp",
]
if CONFIG["MOZ_DXCOMPILER"] and not CONFIG["MOZ_ARTIFACT_BUILDS"]:
FINAL_TARGET_FILES += [
"%" + CONFIG["MOZ_DXC_DLL_PATH"],
]
if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
CXXFLAGS += ["-Werror=implicit-int-conversion", "-Wno-shorten-64-to-32"]
CXXFLAGS += ["-Werror=switch"]
include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"