Bug 1848763 - update ntlm connection reset tests. r=necko-reviewers,valentin
[gecko.git] / dom / webgpu / ExternalTextureD3D11.h
blob82bdd86437190b7d9ce73aff61b3b618efa4a7be
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GPU_ExternalTextureD3D11_H_
7 #define GPU_ExternalTextureD3D11_H_
9 #include "mozilla/webgpu/ExternalTexture.h"
11 struct ID3D11Texture2D;
13 namespace mozilla {
15 namespace webgpu {
17 class ExternalTextureD3D11 final : public ExternalTexture {
18 public:
19 static UniquePtr<ExternalTextureD3D11> Create(
20 const uint32_t aWidth, const uint32_t aHeight,
21 const struct ffi::WGPUTextureFormat aFormat);
23 ExternalTextureD3D11(const uint32_t aWidth, const uint32_t aHeight,
24 const struct ffi::WGPUTextureFormat aFormat,
25 RefPtr<ID3D11Texture2D> aTexture);
26 virtual ~ExternalTextureD3D11();
28 void* GetExternalTextureHandle() override;
30 Maybe<layers::SurfaceDescriptor> ToSurfaceDescriptor() override;
32 protected:
33 RefPtr<ID3D11Texture2D> mTexture;
36 } // namespace webgpu
37 } // namespace mozilla
39 #endif // GPU_Texture_H_