Index: src/core/SkBitmapProcState.cpp |
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
index 2227010da30a1bccddbd066c2548ee46bb85a6ff..31109aaee972df057efae1e8bb000a77ab1b977f 100644 |
--- a/src/core/SkBitmapProcState.cpp |
+++ b/src/core/SkBitmapProcState.cpp |
@@ -37,7 +37,7 @@ extern void Clamp_S32_opaque_D32_nofilter_DX_shaderproc(const SkBitmapProcState& |
#include "SkBitmapProcState_filter.h" |
#include "SkBitmapProcState_procs.h" |
-SkBitmapProcState::SkBitmapProcState() : fBMState(NULL) {} |
+SkBitmapProcState::SkBitmapProcState() : fBMState(nullptr) {} |
SkBitmapProcState::~SkBitmapProcState() { |
SkInPlaceDeleteCheck(fBMState, fBMStateStorage.get()); |
@@ -122,7 +122,7 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { |
fBMState = controller.requestBitmap(fOrigBitmap, inv, paint.getFilterQuality(), |
fBMStateStorage.get(), fBMStateStorage.size()); |
// Note : we allow the controller to return an empty (zero-dimension) result. Should we? |
- if (NULL == fBMState || fBMState->pixmap().info().isEmpty()) { |
+ if (nullptr == fBMState || fBMState->pixmap().info().isEmpty()) { |
return false; |
} |
fPixmap = fBMState->pixmap(); |
@@ -174,10 +174,10 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { |
fAlphaScale = SkAlpha255To256(paint.getAlpha()); |
- fShaderProc32 = NULL; |
- fShaderProc16 = NULL; |
- fSampleProc32 = NULL; |
- fSampleProc16 = NULL; |
+ fShaderProc32 = nullptr; |
+ fShaderProc16 = nullptr; |
+ fSampleProc32 = nullptr; |
+ fSampleProc16 = nullptr; |
// recompute the triviality of the matrix here because we may have |
// changed it! |
@@ -201,8 +201,8 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { |
bool SkBitmapProcState::chooseScanlineProcs(bool trivialMatrix, bool clampClamp, |
const SkPaint& paint) { |
fMatrixProc = this->chooseMatrixProc(trivialMatrix); |
- // TODO(dominikg): SkASSERT(fMatrixProc) instead? chooseMatrixProc never returns NULL. |
- if (NULL == fMatrixProc) { |
+ // TODO(dominikg): SkASSERT(fMatrixProc) instead? chooseMatrixProc never returns nullptr. |
+ if (nullptr == fMatrixProc) { |
return false; |
} |
@@ -338,11 +338,11 @@ bool SkBitmapProcState::chooseScanlineProcs(bool trivialMatrix, bool clampClamp, |
SI8_D16_filter_DX, |
// Don't support 4444 -> 565 |
- NULL, NULL, NULL, NULL, |
+ nullptr, nullptr, nullptr, nullptr, |
// Don't support A8 -> 565 |
- NULL, NULL, NULL, NULL, |
+ nullptr, nullptr, nullptr, nullptr, |
// Don't support G8 -> 565 (but we could) |
- NULL, NULL, NULL, NULL |
+ nullptr, nullptr, nullptr, nullptr |
}; |
#endif |
@@ -364,7 +364,7 @@ bool SkBitmapProcState::chooseScanlineProcs(bool trivialMatrix, bool clampClamp, |
fShaderProc32 = Clamp_S32_opaque_D32_nofilter_DX_shaderproc; |
} |
- if (NULL == fShaderProc32) { |
+ if (nullptr == fShaderProc32) { |
fShaderProc32 = this->chooseShaderProc32(); |
} |
} |
@@ -381,7 +381,7 @@ static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, |
int count) { |
SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); |
SkASSERT(s.fInvKy == 0); |
- SkASSERT(count > 0 && colors != NULL); |
+ SkASSERT(count > 0 && colors != nullptr); |
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel); |
const int maxX = s.fPixmap.width() - 1; |
@@ -455,7 +455,7 @@ static void Repeat_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, |
int count) { |
SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); |
SkASSERT(s.fInvKy == 0); |
- SkASSERT(count > 0 && colors != NULL); |
+ SkASSERT(count > 0 && colors != nullptr); |
SkASSERT(kNone_SkFilterQuality == s.fFilterLevel); |
const int stopX = s.fPixmap.width(); |
@@ -495,7 +495,7 @@ static void S32_D32_constX_shaderproc(const SkBitmapProcState& s, |
int count) { |
SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask)) == 0); |
SkASSERT(s.fInvKy == 0); |
- SkASSERT(count > 0 && colors != NULL); |
+ SkASSERT(count > 0 && colors != nullptr); |
SkASSERT(1 == s.fPixmap.width()); |
int iY0; |
@@ -633,7 +633,7 @@ bool SkBitmapProcState::setupForTranslate() { |
SkBitmapProcState::ShaderProc32 SkBitmapProcState::chooseShaderProc32() { |
if (kN32_SkColorType != fPixmap.colorType()) { |
- return NULL; |
+ return nullptr; |
} |
static const unsigned kMask = SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask; |
@@ -648,13 +648,13 @@ SkBitmapProcState::ShaderProc32 SkBitmapProcState::chooseShaderProc32() { |
} |
if (fAlphaScale < 256) { |
- return NULL; |
+ return nullptr; |
} |
if (fInvType > SkMatrix::kTranslate_Mask) { |
- return NULL; |
+ return nullptr; |
} |
if (kNone_SkFilterQuality != fFilterLevel) { |
- return NULL; |
+ return nullptr; |
} |
SkShader::TileMode tx = (SkShader::TileMode)fTileModeX; |
@@ -672,7 +672,7 @@ SkBitmapProcState::ShaderProc32 SkBitmapProcState::chooseShaderProc32() { |
} |
return DoNothing_shaderproc; |
} |
- return NULL; |
+ return nullptr; |
} |
/////////////////////////////////////////////////////////////////////////////// |