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

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 } 578 }
579 579
580 void SkBlurMaskFilterImpl::computeFastBounds(const SkRect& src, 580 void SkBlurMaskFilterImpl::computeFastBounds(const SkRect& src,
581 SkRect* dst) const { 581 SkRect* dst) const {
582 SkScalar pad = 3.0f * fSigma; 582 SkScalar pad = 3.0f * fSigma;
583 583
584 dst->set(src.fLeft - pad, src.fTop - pad, 584 dst->set(src.fLeft - pad, src.fTop - pad,
585 src.fRight + pad, src.fBottom + pad); 585 src.fRight + pad, src.fBottom + pad);
586 } 586 }
587 587
588 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
589 SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkReadBuffer& buffer) : SkMaskFilter( buffer) {
590 fSigma = buffer.readScalar();
591 fBlurStyle = (SkBlurStyle)buffer.readInt();
592 fBlurFlags = buffer.readUInt() & SkBlurMaskFilter::kAll_BlurFlag;
593 SkASSERT(fSigma > 0);
594 SkASSERT((unsigned)fBlurStyle <= kLastEnum_SkBlurStyle);
595 }
596 #endif
597
588 SkFlattenable* SkBlurMaskFilterImpl::CreateProc(SkReadBuffer& buffer) { 598 SkFlattenable* SkBlurMaskFilterImpl::CreateProc(SkReadBuffer& buffer) {
589 const SkScalar sigma = buffer.readScalar(); 599 const SkScalar sigma = buffer.readScalar();
590 const unsigned style = buffer.readUInt(); 600 const unsigned style = buffer.readUInt();
591 const unsigned flags = buffer.readUInt(); 601 const unsigned flags = buffer.readUInt();
592 if (style <= kLastEnum_SkBlurStyle) { 602 if (style <= kLastEnum_SkBlurStyle) {
593 return SkBlurMaskFilter::Create((SkBlurStyle)style, sigma, flags); 603 return SkBlurMaskFilter::Create((SkBlurStyle)style, sigma, flags);
594 } 604 }
595 return NULL; 605 return NULL;
596 } 606 }
597 607
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 } else { 1275 } else {
1266 str->append("None"); 1276 str->append("None");
1267 } 1277 }
1268 str->append("))"); 1278 str->append("))");
1269 } 1279 }
1270 #endif 1280 #endif
1271 1281
1272 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1282 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1273 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1283 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1274 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1284 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkBlurImageFilter.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698