From 8f66a8862f96bb364cfc857df7d29757f62f3396 Mon Sep 17 00:00:00 2001 From: fmalita Date: Mon, 25 Jan 2016 06:29:44 -0800 Subject: [PATCH] Delete 2 legacy flags No longer used in Chrome/Android: SK_SUPPORT_LEGACY_ANISOTROPIC_MIPMAPS SK_SUPPORT_LEGACY_PRESCALE_SEMANTICS R=caryclark@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1632633002 Review URL: https://codereview.chromium.org/1632633002 --- src/core/SkBitmapController.cpp | 4 ---- src/core/SkMatrix.cpp | 4 ---- src/core/SkMipMap.cpp | 5 ----- 3 files changed, 13 deletions(-) diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp index 5430575..f4d3525 100644 --- a/src/core/SkBitmapController.cpp +++ b/src/core/SkBitmapController.cpp @@ -161,13 +161,9 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmapProvider return false; } -#ifdef SK_SUPPORT_LEGACY_ANISOTROPIC_MIPMAPS - SkScalar invScale = SkScalarSqrt(invScaleSize.width() * invScaleSize.height()); -#else // Use the largest (non-inverse) scale, to ensure anisotropic consistency. SkASSERT(invScaleSize.width() >= 0 && invScaleSize.height() >= 0); const SkScalar invScale = SkTMin(invScaleSize.width(), invScaleSize.height()); -#endif if (invScale > SK_Scalar1) { fCurrMip.reset(SkMipMapCache::FindAndRef(provider.makeCacheDesc())); diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index 4b11fdf..7ae4ed2 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -380,7 +380,6 @@ void SkMatrix::preScale(SkScalar sx, SkScalar sy) { fMat[kMScaleY] *= sy; fMat[kMPersp1] *= sy; -#ifndef SK_SUPPORT_LEGACY_PRESCALE_SEMANTICS // Attempt to simplify our type when applying an inverse scale. // TODO: The persp/affine preconditions are in place to keep the mask consistent with // what computeTypeMask() would produce (persp/skew always implies kScale). @@ -391,9 +390,6 @@ void SkMatrix::preScale(SkScalar sx, SkScalar sy) { } else { this->orTypeMask(kScale_Mask); } -#else - this->orTypeMask(kScale_Mask); -#endif } void SkMatrix::postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py) { diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index c037865..39d42a2 100644 --- a/src/core/SkMipMap.cpp +++ b/src/core/SkMipMap.cpp @@ -297,13 +297,8 @@ SkMipMap* SkMipMap::Build(const SkPixmap& src, SkDiscardableFactoryProc fact) { rowBytes = SkToU32(SkColorTypeMinRowBytes(ct, width)); levels[i].fPixmap = SkPixmap(SkImageInfo::Make(width, height, ct, at), addr, rowBytes); -#ifdef SK_SUPPORT_LEGACY_ANISOTROPIC_MIPMAPS - levels[i].fScale = SkSize::Make(SkIntToScalar(width) / src.width(), - SkIntToScalar(width) / src.width()); -#else levels[i].fScale = SkSize::Make(SkIntToScalar(width) / src.width(), SkIntToScalar(height) / src.height()); -#endif const SkPixmap& dstPM = levels[i].fPixmap; const void* srcBasePtr = srcPM.addr(); -- 2.7.4