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

Unified Diff: src/effects/SkColorCubeFilter.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/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index d1857f991b4c2a39887fe50053fda94b5b030458..c5d4fc5a35d0e910fc4d2bdee8167e4fb1a4a0b4 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -43,12 +43,12 @@ static const int MAX_CUBE_SIZE = 64;
static bool is_valid_3D_lut(SkData* cubeData, int cubeDimension) {
size_t minMemorySize = sizeof(uint8_t) * 4 * cubeDimension * cubeDimension * cubeDimension;
return (cubeDimension >= MIN_CUBE_SIZE) && (cubeDimension <= MAX_CUBE_SIZE) &&
- (NULL != cubeData) && (cubeData->size() >= minMemorySize);
+ (nullptr != cubeData) && (cubeData->size() >= minMemorySize);
}
SkColorFilter* SkColorCubeFilter::Create(SkData* cubeData, int cubeDimension) {
if (!is_valid_3D_lut(cubeData, cubeDimension)) {
- return NULL;
+ return nullptr;
}
return new SkColorCubeFilter(cubeData, cubeDimension);
@@ -67,9 +67,9 @@ uint32_t SkColorCubeFilter::getFlags() const {
SkColorCubeFilter::ColorCubeProcesingCache::ColorCubeProcesingCache(int cubeDimension)
: fCubeDimension(cubeDimension)
, fLutsInited(false) {
- fColorToIndex[0] = fColorToIndex[1] = NULL;
- fColorToFactors[0] = fColorToFactors[1] = NULL;
- fColorToScalar = NULL;
+ fColorToIndex[0] = fColorToIndex[1] = nullptr;
+ fColorToFactors[0] = fColorToFactors[1] = nullptr;
+ fColorToScalar = nullptr;
}
void SkColorCubeFilter::ColorCubeProcesingCache::getProcessingLuts(
@@ -77,11 +77,11 @@ void SkColorCubeFilter::ColorCubeProcesingCache::getProcessingLuts(
const SkScalar** colorToScalar) {
SkOnce(&fLutsInited, &fLutsMutex,
SkColorCubeFilter::ColorCubeProcesingCache::initProcessingLuts, this);
- SkASSERT((fColorToIndex[0] != NULL) &&
- (fColorToIndex[1] != NULL) &&
- (fColorToFactors[0] != NULL) &&
- (fColorToFactors[1] != NULL) &&
- (fColorToScalar != NULL));
+ SkASSERT((fColorToIndex[0] != nullptr) &&
+ (fColorToIndex[1] != nullptr) &&
+ (fColorToFactors[0] != nullptr) &&
+ (fColorToFactors[1] != nullptr) &&
+ (fColorToScalar != nullptr));
(*colorToIndex)[0] = fColorToIndex[0];
(*colorToIndex)[1] = fColorToIndex[1];
(*colorToFactors)[0] = fColorToFactors[0];
@@ -138,7 +138,7 @@ SkFlattenable* SkColorCubeFilter::CreateProc(SkReadBuffer& buffer) {
int cubeDimension = buffer.readInt();
SkAutoDataUnref cubeData(buffer.readByteArrayAsData());
if (!buffer.validate(is_valid_3D_lut(cubeData, cubeDimension))) {
- return NULL;
+ return nullptr;
}
return Create(cubeData, cubeDimension);
}
@@ -161,7 +161,7 @@ void SkColorCubeFilter::toString(SkString* str) const {
class GrColorCubeEffect : public GrFragmentProcessor {
public:
static GrFragmentProcessor* Create(GrTexture* colorCube) {
- return (NULL != colorCube) ? new GrColorCubeEffect(colorCube) : NULL;
+ return (nullptr != colorCube) ? new GrColorCubeEffect(colorCube) : nullptr;
}
virtual ~GrColorCubeEffect();
@@ -239,7 +239,7 @@ GrColorCubeEffect::GLProcessor::~GLProcessor() {
}
void GrColorCubeEffect::GLProcessor::emitCode(EmitArgs& args) {
- if (NULL == args.fInputColor) {
+ if (nullptr == args.fInputColor) {
args.fInputColor = "vec4(1)";
}
@@ -327,13 +327,13 @@ bool SkColorCubeFilter::asFragmentProcessors(GrContext* context, GrProcessorData
}
}
- GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureCube) : NULL;
+ GrFragmentProcessor* frag = textureCube ? GrColorCubeEffect::Create(textureCube) : nullptr;
if (frag) {
if (array) {
*array->append() = frag;
} else {
frag->unref();
- SkDEBUGCODE(frag = NULL;)
+ SkDEBUGCODE(frag = nullptr;)
}
return true;
}
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698