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

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

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/effects/SkBlurMask.cpp ('k') | src/effects/SkColorMatrix.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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // don't need to compute maskRect 533 // don't need to compute maskRect
534 return true; 534 return true;
535 } 535 }
536 536
537 float sigma3 = 3 * SkScalarToFloat(xformedSigma); 537 float sigma3 = 3 * SkScalarToFloat(xformedSigma);
538 538
539 SkRect clipRect = SkRect::Make(clipBounds); 539 SkRect clipRect = SkRect::Make(clipBounds);
540 SkRect srcRect(srcBounds); 540 SkRect srcRect(srcBounds);
541 541
542 // Outset srcRect and clipRect by 3 * sigma, to compute affected blur area. 542 // Outset srcRect and clipRect by 3 * sigma, to compute affected blur area.
543 srcRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); 543 srcRect.outset(sigma3, sigma3);
544 clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3)); 544 clipRect.outset(sigma3, sigma3);
545 srcRect.intersect(clipRect); 545 srcRect.intersect(clipRect);
546 *maskRect = srcRect; 546 *maskRect = srcRect;
547 return true; 547 return true;
548 } 548 }
549 549
550 bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src, 550 bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
551 const SkRect& maskRect, 551 const SkRect& maskRect,
552 GrTexture** result, 552 GrTexture** result,
553 bool canOverwriteSrc) const { 553 bool canOverwriteSrc) const {
554 SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height()); 554 SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } else { 623 } else {
624 str->append("None"); 624 str->append("None");
625 } 625 }
626 str->append("))"); 626 str->append("))");
627 } 627 }
628 #endif 628 #endif
629 629
630 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 630 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
631 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 631 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
632 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 632 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkBlurMask.cpp ('k') | src/effects/SkColorMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698