Update SkSurface MakeFromBackend* factories to take an SkColorType.
Bug: skia:
Change-Id: Ib1b03b1181ec937843eac2e8d8cb03ebe53e32c1
Reviewed-on: https://skia-review.googlesource.com/86760
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index 3aa632c..443128d 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -82,6 +82,15 @@
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);