8#ifndef GrD3DTextureResource_DEFINED
9#define GrD3DTextureResource_DEFINED
28 , fResource(new Resource(
fInfo.fResource,
info.fAlloc)) {
40 return GrBackendFormat::MakeDxgi(this->
dxgiFormat());
55 unsigned int subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES);
72 static std::pair<GrD3DTextureResourceInfo, sk_sp<GrD3DResourceState>>
CreateMSAA(
94 : fResource(textureResource)
98 ~Resource()
override {}
100#ifdef SK_TRACE_MANAGED_RESOURCES
101 void dumpInfo()
const override {
102 SkDebugf(
"GrD3DTextureResource: %p (%d refs)\n", fResource.get(), this->getRefCnt());
107 void freeGPUData()
const override;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define INHERITED(method,...)
void setResourceState(D3D12_RESOURCE_STATES state)
D3D12_RESOURCE_STATES getResourceState() const
virtual ~GrD3DTextureResource()
DXGI_FORMAT dxgiFormat() const
GrD3DTextureResourceInfo fInfo
void prepareForPresent(GrD3DGpu *gpu)
uint32_t mipLevels() const
void setResourceState(const GrD3DGpu *gpu, D3D12_RESOURCE_STATES newResourceState, unsigned int subresource=D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES)
void updateResourceState(D3D12_RESOURCE_STATES newState)
ID3D12Resource * d3dResource() const
GrBackendFormat getBackendFormat() const
D3D12_RESOURCE_STATES currentState() const
void setResourceRelease(sk_sp< GrSurface::RefCntedReleaseProc > releaseHelper)
void releaseResource(GrD3DGpu *gpu)
sk_sp< GrD3DResourceState > grD3DResourceState() const
static bool InitTextureResourceInfo(GrD3DGpu *gpu, const D3D12_RESOURCE_DESC &desc, D3D12_RESOURCE_STATES initialState, GrProtected, D3D12_CLEAR_VALUE *, GrD3DTextureResourceInfo *)
sk_sp< Resource > resource() const
sk_sp< GrD3DResourceState > fState
GrD3DTextureResource(const GrD3DTextureResourceInfo &info, sk_sp< GrD3DResourceState > state)
static std::pair< GrD3DTextureResourceInfo, sk_sp< GrD3DResourceState > > CreateMSAA(GrD3DGpu *gpu, SkISize dimensions, int sampleCnt, const GrD3DTextureResourceInfo &info, SkColor4f clearColor)
unsigned int sampleQualityPattern() const
unsigned int fSampleQualityPattern
gr_cp< ID3D12Resource > fResource