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

Unified Diff: src/effects/SkBlurMaskFilter.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/core/SkPicturePlayback.cpp ('k') | src/effects/SkEmbossMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurMaskFilter.cpp
===================================================================
--- src/effects/SkBlurMaskFilter.cpp (revision 12468)
+++ src/effects/SkBlurMaskFilter.cpp (working copy)
@@ -483,18 +483,10 @@
SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer)
: SkMaskFilter(buffer) {
- fSigma = 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 (fSigma > 0) {
- fSigma = SkBlurMask::ConvertRadiusToSigma(fSigma);
- } else {
- fSigma = -fSigma;
- }
+#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V16_AND_ALL_OTHER_INSTANCES_TOO
+ // TODO: when the skps are recaptured at > v15 the SkScalarAbs can be removed
#endif
+ fSigma = SkScalarAbs(buffer.readScalar());
fBlurStyle = (SkBlurMaskFilter::BlurStyle)buffer.readInt();
fBlurFlags = buffer.readUInt() & SkBlurMaskFilter::kAll_BlurFlag;
SkASSERT(fSigma >= 0);
@@ -503,7 +495,7 @@
void SkBlurMaskFilterImpl::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
- buffer.writeScalar(-fSigma);
+ buffer.writeScalar(fSigma);
buffer.writeInt(fBlurStyle);
buffer.writeUInt(fBlurFlags);
}
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/effects/SkEmbossMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698