diff options
author | 2015-08-27 07:41:13 -0700 | |
---|---|---|
committer | 2015-08-27 07:41:16 -0700 | |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/views/animated/SkImageView.cpp | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/views/animated/SkImageView.cpp')
-rw-r--r-- | src/views/animated/SkImageView.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/views/animated/SkImageView.cpp b/src/views/animated/SkImageView.cpp index 2956729fef..04b8258651 100644 --- a/src/views/animated/SkImageView.cpp +++ b/src/views/animated/SkImageView.cpp @@ -16,10 +16,10 @@ SkImageView::SkImageView() { - fMatrix = NULL; + fMatrix = nullptr; fScaleType = kMatrix_ScaleType; - fData.fAnim = NULL; // handles initializing the other union values + fData.fAnim = nullptr; // handles initializing the other union values fDataIsAnim = true; fUriIsValid = false; // an empty string is not valid @@ -65,7 +65,7 @@ void SkImageView::setScaleType(ScaleType st) { fScaleType = SkToU8(st); if (fUriIsValid) - this->inval(NULL); + this->inval(nullptr); } } @@ -92,7 +92,7 @@ void SkImageView::setImageMatrix(const SkMatrix* matrix) if (matrix && !matrix->isIdentity()) { - if (fMatrix == NULL) + if (fMatrix == nullptr) fMatrix = (SkMatrix*)sk_malloc_throw(sizeof(SkMatrix)); *fMatrix = *matrix; changed = true; @@ -103,14 +103,14 @@ void SkImageView::setImageMatrix(const SkMatrix* matrix) { SkASSERT(!fMatrix->isIdentity()); sk_free(fMatrix); - fMatrix = NULL; + fMatrix = nullptr; changed = true; } } // only redraw if we changed our matrix and we're not in scaleToFit mode if (changed && this->getScaleType() == kMatrix_ScaleType && fUriIsValid) - this->inval(NULL); + this->inval(nullptr); } /////////////////////////////////////////////////////////////////////////////////////////////// @@ -120,7 +120,7 @@ bool SkImageView::onEvent(const SkEvent& evt) if (evt.isType(SK_EventType_Inval)) { if (fUriIsValid) - this->inval(NULL); + this->inval(nullptr); return true; } return this->INHERITED::onEvent(evt); @@ -174,7 +174,7 @@ void SkImageView::onDraw(SkCanvas* canvas) SkDEBUGF(("SkImageView : now = %X[%12.3f], diff = %d\n", now, now/1000., diff)); if (diff == SkAnimator::kDifferent) - this->inval(NULL); + this->inval(nullptr); else if (diff == SkAnimator::kPartiallyDifferent) { SkRect bounds; @@ -207,7 +207,7 @@ void SkImageView::onInflate(const SkDOM& dom, const SkDOMNode* node) void SkImageView::onUriChange() { if (this->freeData()) - this->inval(NULL); + this->inval(nullptr); fUriIsValid = true; // give ensureUriIsLoaded() a shot at the new uri } @@ -220,7 +220,7 @@ bool SkImageView::freeData() else delete fData.fBitmap; - fData.fAnim = NULL; // valid for all union values + fData.fAnim = nullptr; // valid for all union values return true; } return false; |