Chromium Code Reviews| Index: src/core/SkMipMap.cpp |
| diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp |
| index 7266dc6b21192c16019c0277ea4387244033d209..c1751f01abc69a1b24fb86ee46db00f1f3524908 100644 |
| --- a/src/core/SkMipMap.cpp |
| +++ b/src/core/SkMipMap.cpp |
| @@ -326,8 +326,16 @@ bool SkMipMap::extractLevel(const SkSize& scaleSize, Level* levelPtr) const { |
| } |
| SkASSERT(scaleSize.width() >= 0 && scaleSize.height() >= 0); |
| + |
| +#ifdef SK_SUPPORT_LEGACY_ANISOTROPIC_MIPMAP_SCALE |
|
reed1
2016/02/16 21:37:56
Written this way, we are going to change skia's de
f(malita)
2016/02/16 21:46:23
Indeed - I did not consider applying this to Chrom
|
| // Use the smallest scale to match the GPU impl. |
| const SkScalar scale = SkTMin(scaleSize.width(), scaleSize.height()); |
| +#else |
| + // Ideally we'd pick the smaller scale, to match Ganesh. But ignoring one of the |
| + // scales may produce some attrocious results, so for now we use the geometric mean. |
| + // (https://bugs.chromium.org/p/skia/issues/detail?id=4863) |
| + const SkScalar scale = SkScalarSqrt(scaleSize.width() * scaleSize.height()); |
| +#endif |
| if (scale >= SK_Scalar1 || scale <= 0 || !SkScalarIsFinite(scale)) { |
| return false; |