diff options
author | Brian Osman <brianosman@google.com> | 2017-01-11 16:58:42 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-12 14:31:31 +0000 |
commit | 0c2997b6d85e381e63e3af98245a87bf04753681 (patch) | |
tree | 2b476059185efd3b32377397c5ab3c280e5e2ac7 /tests | |
parent | d0be1ef36c64c2a420cbd82f4c033704d4c54a07 (diff) |
Remove second version of SkImageInfo2GrPixelConfig
Alpha type is not (and never will be) part of pixel config, so the logic
around that was unnecessary. (Also, we already sanitize color type and
alpha type before making a new device at a higher level).
With that out of the way, we can easily supply a full info at the two
call-sites that were using the other version.
BUG=skia:
Change-Id: Iceccdbdebd1062d3e5023620755aabcc86604d2f
Reviewed-on: https://skia-review.googlesource.com/6920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ReadPixelsTest.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 71cd8f5fc9..ee762d19a2 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp @@ -449,10 +449,7 @@ static void test_readpixels_texture(skiatest::Reporter* reporter, GrTexture* tex if (startsWithPixels) { fill_dst_bmp_with_init_data(&bmp); GrPixelConfig dstConfig = - SkImageInfo2GrPixelConfig(gReadPixelsConfigs[c].fColorType, - gReadPixelsConfigs[c].fAlphaType, - nullptr, - *texture->getContext()->caps()); + SkImageInfo2GrPixelConfig(bmp.info(), *texture->getContext()->caps()); uint32_t flags = 0; if (gReadPixelsConfigs[c].fAlphaType == kUnpremul_SkAlphaType) { flags = GrContext::kUnpremul_PixelOpsFlag; |