diff options
Diffstat (limited to 'src/effects/SkEmbossMaskFilter.cpp')
-rw-r--r-- | src/effects/SkEmbossMaskFilter.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index 2d3125000c..905cfab941 100644 --- a/src/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp @@ -134,18 +134,10 @@ SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer) SkASSERT(buffer.getArrayCount() == sizeof(Light)); buffer.readByteArray(&fLight, sizeof(Light)); SkASSERT(fLight.fPad == 0); // for the font-cache lookup to be clean - fBlurSigma = buffer.readScalar(); -#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO - // Fixing this must be done in two stages. When the skps are recaptured in V13, - // remove the ConvertRadiusToSigma but retain the absolute value. - // At the same time, switch the code in flatten to write a positive value. - // When the skps are captured in V14 the absolute value can be removed. - if (fBlurSigma > 0) { - fBlurSigma = SkBlurMask::ConvertRadiusToSigma(fBlurSigma); - } else { - fBlurSigma = -fBlurSigma; - } +#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO + // TODO: Once skps are recaptured in > v15 this SkScalarAbs can be removed #endif + fBlurSigma = SkScalarAbs(buffer.readScalar()); } void SkEmbossMaskFilter::flatten(SkFlattenableWriteBuffer& buffer) const { @@ -154,7 +146,7 @@ void SkEmbossMaskFilter::flatten(SkFlattenableWriteBuffer& buffer) const { Light tmpLight = fLight; tmpLight.fPad = 0; // for the font-cache lookup to be clean buffer.writeByteArray(&tmpLight, sizeof(tmpLight)); - buffer.writeScalar(-fBlurSigma); + buffer.writeScalar(fBlurSigma); } #ifdef SK_DEVELOPER |