diff options
Diffstat (limited to 'src/gpu/gl/GrGLRenderTarget.cpp')
-rw-r--r-- | src/gpu/gl/GrGLRenderTarget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp index 3aa632c44f..443128d4d4 100644 --- a/src/gpu/gl/GrGLRenderTarget.cpp +++ b/src/gpu/gl/GrGLRenderTarget.cpp @@ -82,6 +82,15 @@ sk_sp<GrGLRenderTarget> GrGLRenderTarget::MakeWrapped(GrGLGpu* gpu, return sk_sp<GrGLRenderTarget>(new GrGLRenderTarget(gpu, desc, idDesc, sb)); } +GrBackendRenderTarget GrGLRenderTarget::getBackendRenderTarget() const { + GrGLFramebufferInfo fbi; + fbi.fFBOID = fRTFBOID; + fbi.fFormat = this->getGLGpu()->glCaps().configSizedInternalFormat(this->config()); + + return GrBackendRenderTarget(this->width(), this->height(), this->numColorSamples(), + this->numStencilSamples(), fbi); +} + size_t GrGLRenderTarget::onGpuMemorySize() const { return GrSurface::ComputeSize(this->config(), this->width(), this->height(), fNumSamplesOwnedPerPixel, GrMipMapped::kNo); |