diff options
author | Brian Osman <brianosman@google.com> | 2018-03-27 09:56:31 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-27 14:45:14 +0000 |
commit | 052ef695708eddeaa81c3fcf5747824c1f0ad073 (patch) | |
tree | 1122ad13a7fe3a97d2e6bf4b160f5b9582e679de /tests/GrMipMappedTest.cpp | |
parent | f830443814fb21bd4b1009186b23680e3a38935e (diff) |
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>
Diffstat (limited to 'tests/GrMipMappedTest.cpp')
-rw-r--r-- | tests/GrMipMappedTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<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); |