#include <GrGLAttachment.h>
|
static sk_sp< GrGLAttachment > | MakeStencil (GrGLGpu *gpu, SkISize dimensions, int sampleCnt, GrGLFormat format) |
|
static sk_sp< GrGLAttachment > | MakeMSAA (GrGLGpu *gpu, SkISize dimensions, int sampleCnt, GrGLFormat format) |
|
static sk_sp< GrGLAttachment > | MakeWrappedRenderBuffer (GrGpu *gpu, GrGLuint renderbufferID, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, GrGLFormat format) |
|
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 |
|
void | setMemoryBacking (SkTraceMemoryDump *traceMemoryDump, const SkString &dumpName) const 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 16 of file GrGLAttachment.h.
◆ backendFormat()
Implements GrSurface.
Definition at line 138 of file GrGLAttachment.cpp.
138 {
140}
#define GR_GL_TEXTURE_NONE
static constexpr GrGLenum GrGLFormatToEnum(GrGLFormat format)
◆ format()
◆ MakeMSAA()
Definition at line 93 of file GrGLAttachment.cpp.
96 {
98
99 GL_CALL(GenRenderbuffers(1, &rbID));
100 if (!rbID) {
101 return nullptr;
102 }
107 GL_CALL(DeleteRenderbuffers(1, &rbID));
108 return nullptr;
109 }
110
112 rbID,
115 sampleCnt,
117 "GLAttachmentMakeMSAA"));
118}
static bool renderbuffer_storage_msaa(GrGLGpu *gpu, int sampleCount, GrGLenum format, int width, int height)
#define GR_GL_RENDERBUFFER
GrGLFormat format() const
GrGLenum getRenderbufferInternalFormat(GrGLFormat format) const
const GrGLCaps & glCaps() const
SkISize dimensions() const
constexpr int32_t width() const
constexpr int32_t height() const
◆ MakeStencil()
Definition at line 55 of file GrGLAttachment.cpp.
58 {
60
61 GL_CALL(GenRenderbuffers(1, &rbID));
62 if (!rbID) {
63 return nullptr;
64 }
67
68
69 if (sampleCnt > 1) {
72 GL_CALL(DeleteRenderbuffers(1, &rbID));
73 return nullptr;
74 }
75 } else {
79 GL_CALL(DeleteRenderbuffers(1, &rbID));
80 return nullptr;
81 }
82 }
83
85 rbID,
88 sampleCnt,
90 "GLAttachmentMakeStencil"));
91}
#define GL_ALLOC_CALL(call)
const uint8_t uint32_t uint32_t GError ** error
◆ MakeWrappedRenderBuffer()
Definition at line 28 of file GrGLAttachment.h.
33 {
36 "MakeWrappedRenderBuffer"));
37 }
UsageFlags supportedUsages() const
GrGLuint renderbufferID() const
◆ onAbandon()
void GrGLAttachment::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 GrGpuResource.
Definition at line 132 of file GrGLAttachment.cpp.
132 {
133 fRenderbufferID = 0;
134
136}
void onAbandon() override
◆ onRelease()
void GrGLAttachment::onRelease |
( |
| ) |
|
|
overrideprotectedvirtual |
Overridden to free GPU resources in the backend API.
Reimplemented from GrGpuResource.
Definition at line 121 of file GrGLAttachment.cpp.
121 {
122 if (0 != fRenderbufferID) {
125 GR_GL_CALL(
gl, DeleteRenderbuffers(1, &fRenderbufferID));
126 fRenderbufferID = 0;
127 }
128
130}
#define GR_GL_CALL(IFACE, X)
const GrGLInterface * glInterface() const
void onRelease() override
◆ renderbufferID()
GrGLuint GrGLAttachment::renderbufferID |
( |
| ) |
const |
|
inline |
◆ setMemoryBacking()
Allows subclasses to add additional backing information to the SkTraceMemoryDump.
Reimplemented from GrGpuResource.
Definition at line 142 of file GrGLAttachment.cpp.
143 {
146 traceMemoryDump->setMemoryBacking(dumpName.c_str(),
"gl_renderbuffer", renderbuffer_id.
c_str());
147}
void appendU32(uint32_t value)
const char * c_str() const
The documentation for this class was generated from the following files: