Index: src/gpu/GrPaint.cpp |
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp |
index 6f218a4b0b96dfb2b0ae41c201795808b4acd770..1ec8e502be2a308c513b0afb7ebc025a1d660cdd 100644 |
--- a/src/gpu/GrPaint.cpp |
+++ b/src/gpu/GrPaint.cpp |
@@ -50,7 +50,14 @@ bool GrPaint::isConstantBlendedColor(GrColor* color) const { |
kRGBA_GrColorComponentFlags, false); |
GrXPFactory::InvariantBlendedColor blendedColor; |
- fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor); |
+ if (fXPFactory) { |
+ fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor); |
+ } else { |
+ GrPorterDuffXPFactory::SrcOverInvariantBlendedColor(colorProcInfo.color(), |
+ colorProcInfo.validFlags(), |
+ colorProcInfo.isOpaque(), |
+ &blendedColor); |
+ } |
if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { |
*color = blendedColor.fKnownColor; |