Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrD3DAttachment.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrD3DAttachment_DEFINED
9#define GrD3DAttachment_DEFINED
10
12
16
17class GrD3DGpu;
18
20public:
23 int sampleCnt,
24 DXGI_FORMAT format);
25
26 ~GrD3DAttachment() override {}
27
28 GrBackendFormat backendFormat() const override { return GrBackendFormat::MakeDxgi(fFormat); }
29
30 D3D12_CPU_DESCRIPTOR_HANDLE view() const { return fView.fHandle; }
31
32protected:
33 void onRelease() override;
34 void onAbandon() override;
35
36private:
40 DXGI_FORMAT format,
41 const D3D12_RESOURCE_DESC&,
45 std::string_view label);
46
47 GrD3DGpu* getD3DGpu() const;
48
49 void onSetLabel() override;
50
52 DXGI_FORMAT fFormat;
53};
54
55#endif
UsageFlags supportedUsages() const
GrBackendFormat backendFormat() const override
void onAbandon() override
void onSetLabel() override
void onRelease() override
~GrD3DAttachment() override
D3D12_CPU_DESCRIPTOR_HANDLE view() const
static sk_sp< GrD3DAttachment > MakeStencil(GrD3DGpu *gpu, SkISize dimensions, int sampleCnt, DXGI_FORMAT format)
SkISize dimensions() const
Definition GrSurface.h:27
uint32_t uint32_t * format
D3D12_CPU_DESCRIPTOR_HANDLE fHandle