Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2504)

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 459033002: Change GR_COMPRESS_ALPHA_MASK from compile-time flag to run-time flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Code cleanup Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 69dc0b5319797e70b7333c79170ccd22fed0093d..e8910b43508a95c547bf96c99235d0e429bf49a7 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->getOptions().fDrawPathToCompressedTexture &&
+ 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.
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698