Pin color type when a cross-context image is constructed
Fixes issues with gray images that may be incorrectly re-interpreted as
alpha when re-wrapped. (https://github.com/flutter/flutter/issues/15600)
Change-Id: I4a78466073e14d212108d168eed0b2df1bc92ffe
Reviewed-on: https://skia-review.googlesource.com/116484
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index d71dda8..4e81799 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -136,7 +136,8 @@
}
std::unique_ptr<SkImageGenerator> imageGen = GrBackendTextureImageGenerator::Make(
- texture, kTopLeft_GrSurfaceOrigin, nullptr, kPremul_SkAlphaType, nullptr);
+ texture, kTopLeft_GrSurfaceOrigin, nullptr, kRGBA_8888_SkColorType,
+ kPremul_SkAlphaType, nullptr);
REPORTER_ASSERT(reporter, imageGen);
if (!imageGen) {
gpu->deleteTestingOnlyBackendTexture(backendTex);