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

Unified Diff: src/views/animated/SkImageView.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/views/animated/SkBorderView.cpp ('k') | src/views/animated/SkProgressBarView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/views/animated/SkBorderView.cpp ('k') | src/views/animated/SkProgressBarView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698