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/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 4b58664..0864e32 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -598,6 +598,7 @@
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTexture(context, *outTexture,
kTopLeft_GrSurfaceOrigin, sampleCnt,
+ kRGBA_8888_SkColorType,
nullptr, nullptr);
if (!surface) {
context->getGpu()->deleteTestingOnlyBackendTexture(outTexture);
@@ -621,7 +622,8 @@
}
sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTextureAsRenderTarget(
- context, *outTexture, kTopLeft_GrSurfaceOrigin, sampleCnt, nullptr, nullptr);
+ context, *outTexture, kTopLeft_GrSurfaceOrigin, sampleCnt, kRGBA_8888_SkColorType,
+ nullptr, nullptr);
if (!surface) {
context->getGpu()->deleteTestingOnlyBackendTexture(outTexture);
@@ -894,6 +896,7 @@
return SkSurface::MakeFromBackendTexture(context, backendTex,
kTopLeft_GrSurfaceOrigin, 0,
+ info.colorType(),
sk_ref_sp(info.colorSpace()), nullptr);
};