Chromium Code Reviews| Index: src/gpu/GrSWMaskHelper.cpp |
| diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp |
| index 69dc0b5319797e70b7333c79170ccd22fed0093d..f8f71a2b22c7c2081b5fbc7ede7e9b04110e99f5 100644 |
| --- a/src/gpu/GrSWMaskHelper.cpp |
| +++ b/src/gpu/GrSWMaskHelper.cpp |
| @@ -66,7 +66,6 @@ static inline GrPixelConfig fmt_to_config(SkTextureCompressor::Format fmt) { |
| return config; |
| } |
| -#if GR_COMPRESS_ALPHA_MASK |
| static bool choose_compressed_fmt(const GrDrawTargetCaps* caps, |
| SkTextureCompressor::Format *fmt) { |
| if (NULL == fmt) { |
| @@ -95,7 +94,6 @@ static bool choose_compressed_fmt(const GrDrawTargetCaps* caps, |
| return false; |
| } |
| -#endif |
| } |
| @@ -171,11 +169,10 @@ bool GrSWMaskHelper::init(const SkIRect& resultBounds, |
| SkIRect bounds = SkIRect::MakeWH(resultBounds.width(), |
| resultBounds.height()); |
| -#if GR_COMPRESS_ALPHA_MASK |
| - if (choose_compressed_fmt(fContext->getGpu()->caps(), &fCompressedFormat)) { |
| + if (fContext->supportsDrawPathToCompressedTexture() && |
|
bsalomon
2014/08/11 19:42:42
Could we just expose the options struct here rathe
krajcevski
2014/08/11 20:01:33
Done.
|
| + choose_compressed_fmt(fContext->getGpu()->caps(), &fCompressedFormat)) { |
| fCompressionMode = kCompress_CompressionMode; |
| } |
| -#endif |
| // Make sure that the width is a multiple of the desired block dimensions |
| // to allow for specialized SIMD instructions that compress multiple blocks at a time. |