| 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 GrD3DTypesPriv_DEFINED |
| 9 |
#define GrD3DTypesPriv_DEFINED |
| 10 |
|
| 11 |
#include "include/gpu/ganesh/d3d/GrD3DTypes.h" |
| 12 |
|
| 13 |
struct GrD3DTextureResourceSpec { |
| 14 |
GrD3DTextureResourceSpec() |
| 15 |
: fFormat(DXGI_FORMAT_UNKNOWN) |
| 16 |
, fSampleQualityPattern(DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN) {} |
| 17 |
|
| 18 |
GrD3DTextureResourceSpec(const GrD3DSurfaceInfo& info) |
| 19 |
: fFormat(info.fFormat), fSampleQualityPattern(info.fSampleQualityPattern) {} |
| 20 |
|
| 21 |
DXGI_FORMAT fFormat; |
| 22 |
unsigned int fSampleQualityPattern; |
| 23 |
}; |
| 24 |
|
| 25 |
GrD3DSurfaceInfo GrD3DTextureResourceSpecToSurfaceInfo(const GrD3DTextureResourceSpec& d3dSpec, |
| 26 |
uint32_t sampleCount, |
| 27 |
uint32_t levelCount, |
| 28 |
skgpu::Protected isProtected); |
| 29 |
|
| 30 |
#endif |