respect sRGB when converting from sk to gr configs
authorreed <reed@google.com>
Thu, 3 Mar 2016 16:03:20 +0000 (08:03 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 3 Mar 2016 16:03:20 +0000 (08:03 -0800)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756913003

Review URL: https://codereview.chromium.org/1756913003

src/gpu/SkGr.cpp

index a3848c77e01de508f9c22a96e8c4b2d0f69d8454..6f7bee13955ff9f77c5d5a6922490548e08de860 100644 (file)
@@ -370,9 +370,9 @@ GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, SkColorProf
         case kARGB_4444_SkColorType:
             return kRGBA_4444_GrPixelConfig;
         case kRGBA_8888_SkColorType:
-            //if (kSRGB_SkColorProfileType == pt) {
-            //    return kSRGBA_8888_GrPixelConfig;
-            //}
+            if (kSRGB_SkColorProfileType == pt) {
+                return kSRGBA_8888_GrPixelConfig;
+            }
             return kRGBA_8888_GrPixelConfig;
         case kBGRA_8888_SkColorType:
             return kBGRA_8888_GrPixelConfig;