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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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/SkLumaColorFilter.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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 #endif 240 #endif
241 241
242 //////////////////////////////////////////////////////////////////////////////// 242 ////////////////////////////////////////////////////////////////////////////////
243 243
244 SkImageFilter* SkMagnifierImageFilter::Create(const SkRect& srcRect, SkScalar in set, 244 SkImageFilter* SkMagnifierImageFilter::Create(const SkRect& srcRect, SkScalar in set,
245 SkImageFilter* input) { 245 SkImageFilter* input) {
246 246
247 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) { 247 if (!SkScalarIsFinite(inset) || !SkIsValidRect(srcRect)) {
248 return NULL; 248 return nullptr;
249 } 249 }
250 // Negative numbers in src rect are not supported 250 // Negative numbers in src rect are not supported
251 if (srcRect.fLeft < 0 || srcRect.fTop < 0) { 251 if (srcRect.fLeft < 0 || srcRect.fTop < 0) {
252 return NULL; 252 return nullptr;
253 } 253 }
254 return new SkMagnifierImageFilter(srcRect, inset, input); 254 return new SkMagnifierImageFilter(srcRect, inset, input);
255 } 255 }
256 256
257 257
258 SkMagnifierImageFilter::SkMagnifierImageFilter(const SkRect& srcRect, SkScalar i nset, 258 SkMagnifierImageFilter::SkMagnifierImageFilter(const SkRect& srcRect, SkScalar i nset,
259 SkImageFilter* input) 259 SkImageFilter* input)
260 : INHERITED(1, &input), fSrcRect(srcRect), fInset(inset) { 260 : INHERITED(1, &input), fSrcRect(srcRect), fInset(inset) {
261 SkASSERT(srcRect.x() >= 0 && srcRect.y() >= 0 && inset >= 0); 261 SkASSERT(srcRect.x() >= 0 && srcRect.y() >= 0 && inset >= 0);
262 } 262 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 #ifndef SK_IGNORE_TO_STRING 374 #ifndef SK_IGNORE_TO_STRING
375 void SkMagnifierImageFilter::toString(SkString* str) const { 375 void SkMagnifierImageFilter::toString(SkString* str) const {
376 str->appendf("SkMagnifierImageFilter: ("); 376 str->appendf("SkMagnifierImageFilter: (");
377 str->appendf("src: (%f,%f,%f,%f) ", 377 str->appendf("src: (%f,%f,%f,%f) ",
378 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 378 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
379 str->appendf("inset: %f", fInset); 379 str->appendf("inset: %f", fInset);
380 str->append(")"); 380 str->append(")");
381 } 381 }
382 #endif 382 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLumaColorFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698