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

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

Issue 22418006: effects: Replaces uses of GrAssert with SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months 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/SkGpuBlurUtils.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 uint32_t y = random->nextULessThan(kMaxHeight - height); 212 uint32_t y = random->nextULessThan(kMaxHeight - height);
213 SkScalar inset = SkIntToScalar(random->nextULessThan(kMaxInset)); 213 SkScalar inset = SkIntToScalar(random->nextULessThan(kMaxInset));
214 214
215 SkAutoTUnref<SkMagnifierImageFilter> filter( 215 SkAutoTUnref<SkMagnifierImageFilter> filter(
216 new SkMagnifierImageFilter( 216 new SkMagnifierImageFilter(
217 SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y), 217 SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y),
218 SkIntToScalar(width), SkIntToScalar(height)), 218 SkIntToScalar(width), SkIntToScalar(height)),
219 inset)); 219 inset));
220 GrEffectRef* effect; 220 GrEffectRef* effect;
221 filter->asNewEffect(&effect, textures[0], SkIPoint::Make(0, 0)); 221 filter->asNewEffect(&effect, textures[0], SkIPoint::Make(0, 0));
222 GrAssert(NULL != effect); 222 SkASSERT(NULL != effect);
223 return effect; 223 return effect;
224 } 224 }
225 225
226 /////////////////////////////////////////////////////////////////////////////// 226 ///////////////////////////////////////////////////////////////////////////////
227 227
228 const GrBackendEffectFactory& GrMagnifierEffect::getFactory() const { 228 const GrBackendEffectFactory& GrMagnifierEffect::getFactory() const {
229 return GrTBackendEffectFactory<GrMagnifierEffect>::getInstance(); 229 return GrTBackendEffectFactory<GrMagnifierEffect>::getInstance();
230 } 230 }
231 231
232 bool GrMagnifierEffect::onIsEqual(const GrEffect& sBase) const { 232 bool GrMagnifierEffect::onIsEqual(const GrEffect& sBase) const {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); 346 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1);
347 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); 347 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1);
348 348
349 *dptr = sptr[y_val * width + x_val]; 349 *dptr = sptr[y_val * width + x_val];
350 dptr++; 350 dptr++;
351 } 351 }
352 } 352 }
353 return true; 353 return true;
354 } 354 }
OLDNEW
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698