#include <GrMtlAttachment.h>
|
static sk_sp< GrMtlAttachment > | MakeStencil (GrMtlGpu *gpu, SkISize dimensions, int sampleCnt, MTLPixelFormat format) |
|
static sk_sp< GrMtlAttachment > | MakeMSAA (GrMtlGpu *gpu, SkISize dimensions, int sampleCnt, MTLPixelFormat format) |
|
static sk_sp< GrMtlAttachment > | MakeTexture (GrMtlGpu *gpu, SkISize dimensions, MTLPixelFormat format, uint32_t mipLevels, GrRenderable renderable, int numSamples, skgpu::Budgeted budgeted) |
|
static sk_sp< GrMtlAttachment > | MakeWrapped (GrMtlGpu *gpu, SkISize dimensions, id< MTLTexture >, UsageFlags attachmentUsages, GrWrapCacheable, std::string_view label) |
|
static void | ComputeSharedAttachmentUniqueKey (const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, GrMemoryless memoryless, skgpu::UniqueKey *key) |
|
static void | ComputeScratchKey (const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected, GrMemoryless, skgpu::ScratchKey *key) |
|
static size_t | ComputeSize (const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false) |
|
static uint32_t | CreateUniqueID () |
|
|
void | onRelease () override |
|
void | onAbandon () override |
|
| GrAttachment (GrGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, std::string_view label, GrMemoryless memoryless=GrMemoryless::kNo) |
|
void | setGLRTFBOIDIs0 () |
|
bool | glRTFBOIDis0 () const |
|
void | setRequiresManualMSAAResolve () |
|
bool | requiresManualMSAAResolve () const |
|
void | setReadOnly () |
|
void | setVkRTSupportsInputAttachment () |
|
| GrSurface (GrGpu *gpu, const SkISize &dimensions, skgpu::Protected isProtected, std::string_view label) |
|
| ~GrSurface () override |
|
void | onRelease () override |
|
void | onAbandon () override |
|
void | registerWithCache (skgpu::Budgeted) |
|
void | registerWithCacheWrapped (GrWrapCacheable) |
|
| GrGpuResource (GrGpu *, std::string_view label) |
|
virtual | ~GrGpuResource () |
|
GrGpu * | getGpu () const |
|
virtual void | onRelease () |
|
virtual void | onAbandon () |
|
virtual void | setMemoryBacking (SkTraceMemoryDump *, const SkString &) const |
|
SkString | getResourceName () const |
|
void | dumpMemoryStatisticsPriv (SkTraceMemoryDump *traceMemoryDump, const SkString &resourceName, const char *type, size_t size) const |
|
| GrIORef () |
|
bool | internalHasRef () const |
|
bool | internalHasNoCommandBufferUsages () const |
|
void | addInitialRef () const |
|
Definition at line 19 of file GrMtlAttachment.h.
◆ ~GrMtlAttachment()
GrMtlAttachment::~GrMtlAttachment |
( |
| ) |
|
|
override |
◆ backendFormat()
◆ framebufferOnly()
bool GrMtlAttachment::framebufferOnly |
( |
| ) |
const |
|
inline |
◆ MakeMSAA()
Definition at line 72 of file GrMtlAttachment.mm.
75 {
76 int textureUsage = 0;
77 int storageMode = 0;
78 if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) {
79 textureUsage = MTLTextureUsageShaderRead | MTLTextureUsageRenderTarget;
80 storageMode = MTLStorageModePrivate;
81 }
84}
SkISize dimensions() const
uint32_t uint32_t * format
◆ MakeStencil()
Definition at line 58 of file GrMtlAttachment.mm.
61 {
62 int textureUsage = 0;
63 int storageMode = 0;
64 if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) {
65 textureUsage = MTLTextureUsageRenderTarget;
66 storageMode = MTLStorageModePrivate;
67 }
70}
◆ MakeTexture()
Definition at line 86 of file GrMtlAttachment.mm.
92 {
93 int textureUsage = 0;
94 int storageMode = 0;
95 if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) {
96 textureUsage = MTLTextureUsageShaderRead;
97 storageMode = MTLStorageModePrivate;
98 }
102 if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) {
103 textureUsage |= MTLTextureUsageRenderTarget;
104 }
105 }
106
108 textureUsage, storageMode, budgeted);
109}
◆ MakeWrapped()
◆ mtlFormat()
MTLPixelFormat GrMtlAttachment::mtlFormat |
( |
| ) |
const |
|
inline |
◆ mtlTexture()
id< MTLTexture > GrMtlAttachment::mtlTexture |
( |
| ) |
const |
|
inline |
◆ onAbandon()
void GrMtlAttachment::onAbandon |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to abandon any internal handles, ptrs, etc to backend API resources. This may be called when the underlying 3D context is no longer valid and so no backend API calls should be made.
Reimplemented from GrSurface.
Definition at line 188 of file GrMtlAttachment.mm.
188 {
189 fTexture = nil;
191}
void onAbandon() override
◆ onRelease()
void GrMtlAttachment::onRelease |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to free GPU resources in the backend API.
Reimplemented from GrSurface.
Definition at line 183 of file GrMtlAttachment.mm.
183 {
184 fTexture = nil;
186}
void onRelease() override
◆ sampleCount()
unsigned int GrMtlAttachment::sampleCount |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: