diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-22 10:01:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-22 14:49:44 +0000 |
commit | 5fba7ad39a96d02c8a23cc20e47c5021b6a85baa (patch) | |
tree | 17840b99fbcec0957762a06f3952552466e74ddc /src/gpu/GrSurfaceContext.cpp | |
parent | 9eded2c211773133b86a964b357404ae6b021d7d (diff) |
Support GL_RGB textures and render targets.
Bug= skia:7533
Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717
Reviewed-on: https://skia-review.googlesource.com/108188
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceContext.cpp')
-rw-r--r-- | src/gpu/GrSurfaceContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrSurfaceContext.cpp b/src/gpu/GrSurfaceContext.cpp index ab6c05a375..37d0b71fb0 100644 --- a/src/gpu/GrSurfaceContext.cpp +++ b/src/gpu/GrSurfaceContext.cpp @@ -49,7 +49,8 @@ bool GrSurfaceContext::readPixels(const SkImageInfo& dstInfo, void* dstBuffer, GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrSurfaceContext::readPixels"); // TODO: this seems to duplicate code in SkImage_Gpu::onReadPixels - if (kUnpremul_SkAlphaType == dstInfo.alphaType()) { + if (kUnpremul_SkAlphaType == dstInfo.alphaType() && + !GrPixelConfigIsOpaque(this->asSurfaceProxy()->config())) { flags |= GrContextPriv::kUnpremul_PixelOpsFlag; } auto colorType = SkColorTypeToGrColorType(dstInfo.colorType()); |