| Index: src/views/animated/SkImageView.cpp
|
| diff --git a/src/views/animated/SkImageView.cpp b/src/views/animated/SkImageView.cpp
|
| index 2956729fefe3aac8e4178300b35adf8df4832c8b..04b82586518d20f7b8f1ebb6325c4b11aeccd2d0 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;
|
|
|