Explicitly fail read/writePixels in invalid color space scenarios
authorBrian Osman <brianosman@google.com>
Thu, 5 Jan 2017 15:41:39 +0000 (10:41 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 5 Jan 2017 18:07:55 +0000 (18:07 +0000)
commitefcc41805b43347444b83c1705d3d60c8d0caa70
tree705426a2eec1856364552d03c3648c319fe9e0bc
parent08d57e6ae6510a7724119ab548485b4fcbd0a48d
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>
src/gpu/GrContext.cpp
tests/ImageTest.cpp
tests/ReadPixelsTest.cpp