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

Unified Diff: src/effects/SkEmbossMaskFilter.cpp

Issue 88233003: Code cleanup following recapture of skps (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: More cleanup Created 7 years 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/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkEmbossMaskFilter.cpp
===================================================================
--- src/effects/SkEmbossMaskFilter.cpp (revision 12468)
+++ src/effects/SkEmbossMaskFilter.cpp (working copy)
@@ -134,18 +134,10 @@
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 @@
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
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698