Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index 701e763b1e65d19904c22a9c3a73a80a0f6ca91e..71d9e620e3a7b062dcf029a79938cf6d9492e9a3 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -344,6 +344,12 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b |
return texture; |
} |
+ // SkMipMap::Build doesn't handle sRGB data correctly (yet). |
+ // Failover to the GL code-path for now. |
+ if (kLinear_SkColorProfileType != bitmap.profileType()) { |
+ return nullptr; |
+ } |
+ |
SkASSERT(sizeof(int) <= sizeof(uint32_t)); |
if (bitmap.width() < 0 || bitmap.height() < 0) { |
return nullptr; |