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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « src/effects/SkLayerDrawLooper.cpp ('k') | src/effects/SkMorphologyImageFilter.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 uint32_t inset = random->nextULessThan(kMaxInset); 198 uint32_t inset = random->nextULessThan(kMaxInset);
199 199
200 GrEffect* effect = GrMagnifierEffect::Create( 200 GrEffect* effect = GrMagnifierEffect::Create(
201 texture, 201 texture,
202 (float) width / texture->width(), 202 (float) width / texture->width(),
203 (float) height / texture->height(), 203 (float) height / texture->height(),
204 texture->width() / (float) x, 204 texture->width() / (float) x,
205 texture->height() / (float) y, 205 texture->height() / (float) y,
206 (float) inset / texture->width(), 206 (float) inset / texture->width(),
207 (float) inset / texture->height()); 207 (float) inset / texture->height());
208 SkASSERT(NULL != effect); 208 SkASSERT(effect);
209 return effect; 209 return effect;
210 } 210 }
211 211
212 /////////////////////////////////////////////////////////////////////////////// 212 ///////////////////////////////////////////////////////////////////////////////
213 213
214 const GrBackendEffectFactory& GrMagnifierEffect::getFactory() const { 214 const GrBackendEffectFactory& GrMagnifierEffect::getFactory() const {
215 return GrTBackendEffectFactory<GrMagnifierEffect>::getInstance(); 215 return GrTBackendEffectFactory<GrMagnifierEffect>::getInstance();
216 } 216 }
217 217
218 bool GrMagnifierEffect::onIsEqual(const GrEffect& sBase) const { 218 bool GrMagnifierEffect::onIsEqual(const GrEffect& sBase) const {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1); 365 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1);
366 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1); 366 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1);
367 367
368 *dptr = sptr[y_val * width + x_val]; 368 *dptr = sptr[y_val * width + x_val];
369 dptr++; 369 dptr++;
370 } 370 }
371 } 371 }
372 return true; 372 return true;
373 } 373 }
OLDNEW
« no previous file with comments | « src/effects/SkLayerDrawLooper.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698