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

Side by Side Diff: src/core/SkRRect.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/core/SkPtrRecorder.cpp ('k') | src/core/SkRWBuffer.h » ('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 Google Inc. 2 * Copyright 2012 Google Inc.
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 "SkRRect.h" 8 #include "SkRRect.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 } 353 }
354 354
355 static bool matrix_only_scale_and_translate(const SkMatrix& matrix) { 355 static bool matrix_only_scale_and_translate(const SkMatrix& matrix) {
356 const SkMatrix::TypeMask m = (SkMatrix::TypeMask) (SkMatrix::kAffine_Mask 356 const SkMatrix::TypeMask m = (SkMatrix::TypeMask) (SkMatrix::kAffine_Mask
357 | SkMatrix::kPerspective_Mask); 357 | SkMatrix::kPerspective_Mask);
358 return (matrix.getType() & m) == 0; 358 return (matrix.getType() & m) == 0;
359 } 359 }
360 360
361 bool SkRRect::transform(const SkMatrix& matrix, SkRRect* dst) const { 361 bool SkRRect::transform(const SkMatrix& matrix, SkRRect* dst) const {
362 if (NULL == dst) { 362 if (nullptr == dst) {
363 return false; 363 return false;
364 } 364 }
365 365
366 // Assert that the caller is not trying to do this in place, which 366 // Assert that the caller is not trying to do this in place, which
367 // would violate const-ness. Do not return false though, so that 367 // would violate const-ness. Do not return false though, so that
368 // if they know what they're doing and want to violate it they can. 368 // if they know what they're doing and want to violate it they can.
369 SkASSERT(dst != this); 369 SkASSERT(dst != this);
370 370
371 if (matrix.isIdentity()) { 371 if (matrix.isIdentity()) {
372 *dst = *this; 372 *dst = *this;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 586 }
587 587
588 for (int i = 0; i < 4; ++i) { 588 for (int i = 0; i < 4; ++i) {
589 validate_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight ); 589 validate_radius_check_predicates(fRadii[i].fX, fRect.fLeft, fRect.fRight );
590 validate_radius_check_predicates(fRadii[i].fY, fRect.fTop, fRect.fBottom ); 590 validate_radius_check_predicates(fRadii[i].fY, fRect.fTop, fRect.fBottom );
591 } 591 }
592 } 592 }
593 #endif // SK_DEBUG 593 #endif // SK_DEBUG
594 594
595 /////////////////////////////////////////////////////////////////////////////// 595 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/core/SkPtrRecorder.cpp ('k') | src/core/SkRWBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698