9#ifndef GrGLRenderTarget_DEFINED
10#define GrGLRenderTarget_DEFINED
47 std::string_view label);
49 bool isFBO0(
bool multisample)
const {
50 return (multisample ? fMultisampleFBOID : fSingleSampleFBOID) == 0;
54 return fMultisampleFBOID != 0 && fMultisampleFBOID == fSingleSampleFBOID;
73 void bind(
bool useMultisampleFBO) {
79 return fNeedsStencilAttachmentBind[useMultisampleFBO];
107 std::string_view label);
128 std::string_view label);
130 void setFlags(
const GrGLCaps&,
const IDs&);
133 bool completeStencilAttachment(
GrAttachment* stencil,
bool useMultisampleFBO)
override;
135 size_t onGpuMemorySize()
const override;
137 void onSetLabel()
override;
145 bool fNeedsStencilAttachmentBind[2] = {
false,
false};
146 bool fDMSAARenderToTextureFBOIsMultisample =
false;
153 int fTotalMemorySamplesPerPixel;
#define GR_GL_FRAMEBUFFER
static constexpr bool SkToBool(const T &x)
void bindForPixelOps(GrGLenum fboTarget)
bool glRTFBOIDis0() const
bool alwaysClearStencil() const override
bool hasDynamicMSAAAttachment() const
bool canAttemptStencilAttachment(bool useMultisampleFBO) const override
void bindForResolve(ResolveDirection)
void onAbandon() override
GrGLRenderTarget(GrGLGpu *, const SkISize &, GrGLFormat, int sampleCount, const IDs &, skgpu::Protected, std::string_view label)
int totalMemorySamplesPerPixel() const
void bind(bool useMultisampleFBO)
bool isFBO0(bool multisample) const
static sk_sp< GrGLRenderTarget > MakeWrapped(GrGLGpu *, const SkISize &, GrGLFormat, int sampleCount, const IDs &, int stencilBits, skgpu::Protected, std::string_view label)
void bindInternal(GrGLenum fboTarget, bool useMultisampleFBO)
GrBackendRenderTarget getBackendRenderTarget() const override
GrBackendFormat backendFormat() const override
GrGLFormat format() const
void init(GrGLFormat, const IDs &)
bool mustRebind(bool useMultisampleFBO) const
void dumpMemoryStatistics(SkTraceMemoryDump *traceMemoryDump) const override
bool ensureDynamicMSAAAttachment()
bool isMultisampledRenderToTexture() const
void onRelease() override
GrRenderTarget(GrGpu *, const SkISize &, int sampleCount, GrProtected, std::string_view label, sk_sp< GrAttachment > stenicl=nullptr)
bool glRTFBOIDis0() const
int fTotalMemorySamplesPerPixel
GrGLuint fMultisampleFBOID
GrBackendObjectOwnership fRTFBOOwnership
GrGLuint fSingleSampleFBOID
GrGLuint fMSColorRenderbufferID