Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 03f03b20b1f2a7fd1360eb901e9d3486caca8266..6c99b37ad7a59fe61abca48273e44e5d09fe4848 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -6,7 +6,7 @@ |
*/ |
#include "Sk4fLinearGradient.h" |
-#include "SkColorSpace_Base.h" |
+#include "SkColorSpace_XYZ.h" |
#include "SkGradientShaderPriv.h" |
#include "SkHalf.h" |
#include "SkLinearGradient.h" |
@@ -1747,7 +1747,8 @@ GrGradientEffect::RandomGradientParams::RandomGradientParams(SkRandom* random) { |
if (fUseColors4f) { |
fColorSpace = GrTest::TestColorSpace(random); |
if (fColorSpace) { |
- fColorSpace = as_CSB(fColorSpace)->makeLinearGamma(); |
+ SkASSERT(SkColorSpace_Base::Type::kXYZ == as_CSB(fColorSpace)->type()); |
+ fColorSpace = static_cast<SkColorSpace_XYZ*>(fColorSpace.get())->makeLinearGamma(); |
} |
} |