Index: src/gpu/GrSWMaskHelper.cpp |
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp |
index e8910b43508a95c547bf96c99235d0e429bf49a7..b7b2d1a7c6326f6a1b2f3cebf2b6f5e703104063 100644 |
--- a/src/gpu/GrSWMaskHelper.cpp |
+++ b/src/gpu/GrSWMaskHelper.cpp |
@@ -106,6 +106,8 @@ void GrSWMaskHelper::draw(const SkRect& rect, SkRegion::Op op, |
SkXfermode* mode = SkXfermode::Create(op_to_mode(op)); |
+ SkASSERT(kNone_CompressionMode == fCompressionMode); |
+ |
paint.setXfermode(mode); |
paint.setAntiAlias(antiAlias); |
paint.setColor(SkColorSetARGB(alpha, alpha, alpha, alpha)); |
@@ -156,7 +158,8 @@ void GrSWMaskHelper::draw(const SkPath& path, const SkStrokeRec& stroke, SkRegio |
} |
bool GrSWMaskHelper::init(const SkIRect& resultBounds, |
- const SkMatrix* matrix) { |
+ const SkMatrix* matrix, |
+ bool allowCompression) { |
if (NULL != matrix) { |
fMatrix = *matrix; |
} else { |
@@ -169,7 +172,8 @@ bool GrSWMaskHelper::init(const SkIRect& resultBounds, |
SkIRect bounds = SkIRect::MakeWH(resultBounds.width(), |
resultBounds.height()); |
- if (fContext->getOptions().fDrawPathToCompressedTexture && |
+ if (allowCompression && |
+ fContext->getOptions().fDrawPathToCompressedTexture && |
choose_compressed_fmt(fContext->getGpu()->caps(), &fCompressedFormat)) { |
fCompressionMode = kCompress_CompressionMode; |
} |