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

Unified Diff: src/effects/SkMergeImageFilter.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/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]));
}
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698