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

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

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/SkDiscretePathEffect.cpp ('k') | src/gpu/GrPathUtils.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 9
10 #include "SkEmbossMaskFilter.h" 10 #include "SkEmbossMaskFilter.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const SkMatrix& matrix, SkIPoint* margin) co nst { 82 const SkMatrix& matrix, SkIPoint* margin) co nst {
83 SkScalar sigma = matrix.mapRadius(fBlurSigma); 83 SkScalar sigma = matrix.mapRadius(fBlurSigma);
84 84
85 if (!SkBlurMask::BoxBlur(dst, src, sigma, SkBlurMask::kInner_Style, 85 if (!SkBlurMask::BoxBlur(dst, src, sigma, SkBlurMask::kInner_Style,
86 SkBlurMask::kLow_Quality)) { 86 SkBlurMask::kLow_Quality)) {
87 return false; 87 return false;
88 } 88 }
89 89
90 dst->fFormat = SkMask::k3D_Format; 90 dst->fFormat = SkMask::k3D_Format;
91 if (margin) { 91 if (margin) {
92 margin->set(SkScalarCeil(3*sigma), SkScalarCeil(3*sigma)); 92 margin->set(SkScalarCeilToInt(3*sigma), SkScalarCeilToInt(3*sigma));
93 } 93 }
94 94
95 if (src.fImage == NULL) { 95 if (src.fImage == NULL) {
96 return true; 96 return true;
97 } 97 }
98 98
99 // create a larger buffer for the other two channels (should force fBlur to do this for us) 99 // create a larger buffer for the other two channels (should force fBlur to do this for us)
100 100
101 { 101 {
102 uint8_t* alphaPlane = dst->fImage; 102 uint8_t* alphaPlane = dst->fImage;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 str->append(") "); 162 str->append(") ");
163 163
164 str->appendf("ambient: %d specular: %d ", 164 str->appendf("ambient: %d specular: %d ",
165 fLight.fAmbient, fLight.fSpecular); 165 fLight.fAmbient, fLight.fSpecular);
166 166
167 str->append("blurSigma: "); 167 str->append("blurSigma: ");
168 str->appendScalar(fBlurSigma); 168 str->appendScalar(fBlurSigma);
169 str->append(")"); 169 str->append(")");
170 } 170 }
171 #endif 171 #endif
OLDNEW
« no previous file with comments | « src/effects/SkDiscretePathEffect.cpp ('k') | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698