Rename SkSourceGammaTreatment to SkDestinationSurfaceColorMode

This is much more explicit about what that type represents (are we in
legacy mode or not), which also makes it suitable for other (upcoming)
usage.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529

Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf
Reviewed-on: https://skia-review.googlesource.com/4529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index 5799f0b..ccddd25 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -90,7 +90,7 @@
     SkData* onRefEncoded(GrContext*) const override;
     bool getROPixels(SkBitmap*, CachingHint) const override;
     GrTexture* asTextureRef(GrContext*, const GrTextureParams&,
-                            SkSourceGammaTreatment) const override;
+                            SkDestinationSurfaceColorMode) const override;
     sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
 
     // exposed for SkSurface_Raster via SkNewImageFromPixelRef
@@ -198,7 +198,7 @@
 }
 
 GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrTextureParams& params,
-                                        SkSourceGammaTreatment gammaTreatment) const {
+                                        SkDestinationSurfaceColorMode colorMode) const {
 #if SK_SUPPORT_GPU
     if (!ctx) {
         return nullptr;
@@ -209,10 +209,10 @@
     if (tex) {
         GrTextureAdjuster adjuster(fPinnedTexture.get(), fBitmap.alphaType(), fBitmap.bounds(),
                                    fPinnedUniqueID, fBitmap.colorSpace());
-        return adjuster.refTextureSafeForParams(params, gammaTreatment, nullptr);
+        return adjuster.refTextureSafeForParams(params, colorMode, nullptr);
     }
 
-    return GrRefCachedBitmapTexture(ctx, fBitmap, params, gammaTreatment);
+    return GrRefCachedBitmapTexture(ctx, fBitmap, params, colorMode);
 #endif
 
     return nullptr;
@@ -238,9 +238,9 @@
     } else {
         SkASSERT(fPinnedCount == 0);
         SkASSERT(fPinnedUniqueID == 0);
-        fPinnedTexture.reset(GrRefCachedBitmapTexture(ctx, fBitmap,
-                                                      GrTextureParams::ClampNoFilter(),
-                                                      SkSourceGammaTreatment::kRespect));
+        fPinnedTexture.reset(
+            GrRefCachedBitmapTexture(ctx, fBitmap, GrTextureParams::ClampNoFilter(),
+                                     SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware));
         fPinnedUniqueID = fBitmap.getGenerationID();
     }
     // Note: we always increment, even if we failed to create the pinned texture