Remove spurious checks for sRGB float data
authorBrian Osman <brianosman@google.com>
Thu, 12 Jan 2017 22:18:22 +0000 (17:18 -0500)
committerBrian Osman <brianosman@google.com>
Fri, 13 Jan 2017 14:53:48 +0000 (14:53 +0000)
We don't support this. F16 or F32 textures must be built with a linear
transfer function, if any.

BUG=skia:

Change-Id: Ia8d83a03d12ddc3b70f5d7e4fabed72f6c2af538
Reviewed-on: https://skia-review.googlesource.com/6978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
src/gpu/SkGr.cpp

index 5c937d4..eec3cd7 100644 (file)
@@ -177,9 +177,7 @@ GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap, SkBud
 
     if (caps->srgbSupport() &&
         pixmap.info().colorSpace() && pixmap.info().colorSpace()->gammaCloseToSRGB() &&
-        !(GrPixelConfigIsSRGB(desc.fConfig) ||
-          kRGBA_half_GrPixelConfig == desc.fConfig ||
-          kRGBA_float_GrPixelConfig == desc.fConfig)) {
+        !GrPixelConfigIsSRGB(desc.fConfig)) {
         // We were supplied an sRGB-like color space, but we don't have a suitable pixel config.
         // Convert to 8888 sRGB so we can handle the data correctly. The raster backend doesn't
         // handle sRGB Index8 -> sRGB 8888 correctly (yet), so lie about both the source and