aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Gpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/image/SkImage_Gpu.cpp')
-rw-r--r--src/image/SkImage_Gpu.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index e70ba05be5..a47587f1bc 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -211,13 +211,9 @@ bool SkImage_Gpu::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size
// with arbitrary color spaces. Unfortunately, this is one spot where we go from image to
// surface (rather than the opposite), and our lenient image rules break our (currently) more
// strict surface rules.
- // We treat null-dst color space as always equal to fColorSpace for this kind of read-back.
sk_sp<SkColorSpace> surfaceColorSpace = fColorSpace;
- if (!flags) {
- if (!dstInfo.colorSpace() ||
- SkColorSpace::Equals(fColorSpace.get(), dstInfo.colorSpace())) {
- surfaceColorSpace = nullptr;
- }
+ if (!flags && SkColorSpace::Equals(fColorSpace.get(), dstInfo.colorSpace())) {
+ surfaceColorSpace = nullptr;
}
sk_sp<GrSurfaceContext> sContext = fContext->contextPriv().makeWrappedSurfaceContext(