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

Unified Diff: src/core/SkBitmapProcState.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/core/SkBitmapProcState.h ('k') | src/core/SkBitmapProcState_sample.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/core/SkBitmapProcState.h ('k') | src/core/SkBitmapProcState_sample.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698