Index: src/effects/SkMergeImageFilter.cpp |
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp |
index 4c5404d5fb8bc9baf4de46374d1a86012b268c9f..6e06b25945a84d73795d76a085d371a8cc9a5b72 100755 |
--- a/src/effects/SkMergeImageFilter.cpp |
+++ b/src/effects/SkMergeImageFilter.cpp |
@@ -24,7 +24,7 @@ void SkMergeImageFilter::initAllocModes() { |
fModes = SkTCast<uint8_t*>(sk_malloc_throw(size)); |
} |
} else { |
- fModes = NULL; |
+ fModes = nullptr; |
} |
} |
@@ -36,7 +36,7 @@ void SkMergeImageFilter::initModes(const SkXfermode::Mode modes[]) { |
fModes[i] = SkToU8(modes[i]); |
} |
} else { |
- fModes = NULL; |
+ fModes = nullptr; |
} |
} |
@@ -71,7 +71,7 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
const int y0 = bounds.top(); |
SkAutoTUnref<SkBaseDevice> dst(proxy->createDevice(bounds.width(), bounds.height())); |
- if (NULL == dst) { |
+ if (nullptr == dst) { |
return false; |
} |
SkCanvas canvas(dst); |
@@ -96,7 +96,7 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
if (fModes) { |
paint.setXfermodeMode((SkXfermode::Mode)fModes[i]); |
} else { |
- paint.setXfermode(NULL); |
+ paint.setXfermode(nullptr); |
} |
canvas.drawSprite(*srcPtr, pos.x() - x0, pos.y() - y0, &paint); |
didProduceResult = true; |
@@ -114,7 +114,7 @@ bool SkMergeImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, |
SkFlattenable* SkMergeImageFilter::CreateProc(SkReadBuffer& buffer) { |
Common common; |
if (!common.unflatten(buffer, -1)) { |
- return NULL; |
+ return nullptr; |
} |
const int count = common.inputCount(); |
@@ -123,23 +123,23 @@ SkFlattenable* SkMergeImageFilter::CreateProc(SkReadBuffer& buffer) { |
SkAutoSTArray<4, SkXfermode::Mode> modes(count); |
SkAutoSTArray<4, uint8_t> modes8(count); |
if (!buffer.readByteArray(modes8.get(), count)) { |
- return NULL; |
+ return nullptr; |
} |
for (int i = 0; i < count; ++i) { |
modes[i] = (SkXfermode::Mode)modes8[i]; |
buffer.validate(SkIsValidMode(modes[i])); |
} |
if (!buffer.isValid()) { |
- return NULL; |
+ return nullptr; |
} |
return Create(common.inputs(), count, modes.get(), &common.cropRect()); |
} |
- return Create(common.inputs(), count, NULL, &common.cropRect()); |
+ return Create(common.inputs(), count, nullptr, &common.cropRect()); |
} |
void SkMergeImageFilter::flatten(SkWriteBuffer& buffer) const { |
this->INHERITED::flatten(buffer); |
- buffer.writeBool(fModes != NULL); |
+ buffer.writeBool(fModes != nullptr); |
if (fModes) { |
buffer.writeByteArray(fModes, countInputs() * sizeof(fModes[0])); |
} |