From 052ef695708eddeaa81c3fcf5747824c1f0ad073 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Tue, 27 Mar 2018 09:56:31 -0400 Subject: 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 Reviewed-by: Greg Daniel --- tests/GrMipMappedTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/GrMipMappedTest.cpp') diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp index d71dda8dc0..4e8179950d 100644 --- a/tests/GrMipMappedTest.cpp +++ b/tests/GrMipMappedTest.cpp @@ -136,7 +136,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrBackendTextureImageMipMappedTest, reporter, } std::unique_ptr 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); -- cgit v1.2.3