Remove unexpected color conversion in GrSurfaceContext::readPixels
One of the branches of this function creates a temporary
GrSurfaceContext and (recursively) calls readPixels on that object.
In the case that canvas2DFastPath is true, this GrSurfaceContext is
given nullptr as its color space. This value historically mean to
do no color conversion, but now is interpreted as sRGB.
Consequently, if the content being copied is not sRGB, this will
introduce a conversion from sRGB to the content's color space, which
will result in incorrect pixel values being read.
Bug: skia:10965 chromium:1115317
Change-Id: I62b7edb728f0dbefa9a5a9c60905dee0cde6455a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335738
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed