14#define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X)
16#define GL_ALLOC_CALL(call) \
18 if (gpu->glCaps().skipErrorChecks()) { \
19 GR_GL_CALL(gpu->glInterface(), call); \
20 return static_cast<GrGLenum>(GR_GL_NO_ERROR); \
22 gpu->clearErrorsAndCheckForOOM(); \
23 GR_GL_CALL_NOERRCHECK(gpu->glInterface(), call); \
24 return gpu->getErrorAndCheckForOOM(); \
61 GL_CALL(GenRenderbuffers(1, &rbID));
72 GL_CALL(DeleteRenderbuffers(1, &rbID));
79 GL_CALL(DeleteRenderbuffers(1, &rbID));
90 "GLAttachmentMakeStencil"));
99 GL_CALL(GenRenderbuffers(1, &rbID));
107 GL_CALL(DeleteRenderbuffers(1, &rbID));
117 "GLAttachmentMakeMSAA"));
122 if (0 != fRenderbufferID) {
125 GR_GL_CALL(
gl, DeleteRenderbuffers(1, &fRenderbufferID));
149void GrGLAttachment::onSetLabel() {
152 const std::string label =
"_Skia_" + this->
getLabel();
156 ObjectLabel(
GR_GL_TEXTURE, fRenderbufferID, -1, label.c_str()));
static bool renderbuffer_storage_msaa(GrGLGpu *gpu, int sampleCount, GrGLenum format, int width, int height)
#define GL_ALLOC_CALL(call)
#define GR_GL_RENDERBUFFER
#define GR_GL_TEXTURE_NONE
#define GR_GL_CALL(IFACE, X)
static constexpr GrGLenum GrGLFormatToEnum(GrGLFormat format)
void setMemoryBacking(SkTraceMemoryDump *traceMemoryDump, const SkString &dumpName) const override
GrGLuint renderbufferID() const
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)
GrGLFormat format() const
GrBackendFormat backendFormat() const override
void onRelease() override
void onAbandon() override
GrGLenum getRenderbufferInternalFormat(GrGLFormat format) const
@ kES_EXT_MsToTexture_MSFBOType
@ kES_IMG_MsToTexture_MSFBOType
MSFBOType msFBOType() const
bool debugSupport() const
Is there support for GL_KHR_debug?
const GrGLCaps & glCaps() const
const GrGLInterface * glInterface() const
std::string getLabel() const
SkISize dimensions() const
void onAbandon() override
void onRelease() override
void appendU32(uint32_t value)
const char * c_str() const
virtual void setMemoryBacking(const char *dumpName, const char *backingType, const char *backingObjectId)=0
EMSCRIPTEN_KEEPALIVE void empty()
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
constexpr int32_t width() const
constexpr int32_t height() const