aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-01-05 21:40:16 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-05 21:40:28 +0000
commit3afa628e50e30b3e4398280f342e449ae64de230 (patch)
treeea0e05bf8d4681876f20b934b69250d82e1ea29f /src
parent81ad5f744a775826c0d68bf035e891ae178f89d2 (diff)
Revert "Explicitly fail read/writePixels in invalid color space scenarios"
This reverts commit efcc41805b43347444b83c1705d3d60c8d0caa70. Reason for revert: Possible culprit for Chromium failures. Original change's description: > Explicitly fail read/writePixels in invalid color space scenarios > > It's not well defined what to do when moving from a nullptr color space to > a tagged destination (drawing, reading, writing, etc...). In these > scenarios, at least, we can choose to disallow the operation (rather than > produce an unexpected or inconsistent result). > > BUG=skia: > > Change-Id: I033b23c6f2bb00664efc8fdab1b3f52053d77695 > Reviewed-on: https://skia-review.googlesource.com/6600 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I17791f9285089ede42b7921324e0dc264865be1d Reviewed-on: https://skia-review.googlesource.com/6628 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 310f4554fe..30f596fe10 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -278,11 +278,6 @@ bool GrContext::writeSurfacePixels(GrSurface* surface, SkColorSpace* dstColorSpa
return false;
}
- // We don't allow writing to a color space tagged destination if the source isn't tagged
- if (dstColorSpace && !srcColorSpace) {
- return false;
- }
-
GrGpu::DrawPreference drawPreference = GrGpu::kNoDraw_DrawPreference;
// Don't prefer to draw for the conversion (and thereby access a texture from the cache) when
// we've already determined that there isn't a roundtrip preserving conversion processor pair.
@@ -432,11 +427,6 @@ bool GrContext::readSurfacePixels(GrSurface* src, SkColorSpace* srcColorSpace,
return false;
}
- // We don't allow reading to a color space tagged destination if the source isn't tagged
- if (dstColorSpace && !srcColorSpace) {
- return false;
- }
-
GrGpu::DrawPreference drawPreference = GrGpu::kNoDraw_DrawPreference;
// Don't prefer to draw for the conversion (and thereby access a texture from the cache) when
// we've already determined that there isn't a roundtrip preserving conversion processor pair.