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

Unified Diff: src/codec/SkSwizzler.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/codec/SkSwizzler.h ('k') | src/codec/SkWebpCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSwizzler.cpp
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp
index db49fb17d9702e0bda365b34dde660adb208e67c..54d9764fe84e52ad77eb827a9e7ff0d13f21f331 100644
--- a/src/codec/SkSwizzler.cpp
+++ b/src/codec/SkSwizzler.cpp
@@ -517,13 +517,13 @@ SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc,
SkCodec::ZeroInitialized zeroInit,
const SkImageInfo& srcInfo) {
if (dstInfo.colorType() == kUnknown_SkColorType || kUnknown == sc) {
- return NULL;
+ return nullptr;
}
if ((kIndex == sc || kIndex4 == sc || kIndex2 == sc || kIndex1 == sc)
- && NULL == ctable) {
- return NULL;
+ && nullptr == ctable) {
+ return nullptr;
}
- RowProc proc = NULL;
+ RowProc proc = nullptr;
switch (sc) {
case kBit:
@@ -679,8 +679,8 @@ SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc,
default:
break;
}
- if (NULL == proc) {
- return NULL;
+ if (nullptr == proc) {
+ return nullptr;
}
// Store deltaSrc in bytes if it is an even multiple, otherwise use bits
@@ -688,7 +688,7 @@ SkSwizzler* SkSwizzler::CreateSwizzler(SkSwizzler::SrcConfig sc,
// get sampleX based on srcInfo and dstInfo dimensions
int sampleX;
- SkScaledCodec::ComputeSampleSize(dstInfo, srcInfo, &sampleX, NULL);
+ SkScaledCodec::ComputeSampleSize(dstInfo, srcInfo, &sampleX, nullptr);
return new SkSwizzler(proc, ctable, deltaSrc, dstInfo, sampleX);
}
@@ -707,13 +707,13 @@ SkSwizzler::SkSwizzler(RowProc proc, const SkPMColor* ctable,
}
SkSwizzler::ResultAlpha SkSwizzler::swizzle(void* dst, const uint8_t* SK_RESTRICT src) {
- SkASSERT(NULL != dst && NULL != src);
+ SkASSERT(nullptr != dst && nullptr != src);
return fRowProc(dst, src, fDstInfo.width(), fSampleX * fDeltaSrc, fX0 * fDeltaSrc, fColorTable);
}
void SkSwizzler::Fill(void* dstStartRow, const SkImageInfo& dstInfo, size_t dstRowBytes,
uint32_t numRows, uint32_t colorOrIndex, const SkPMColor* colorTable) {
- SkASSERT(dstStartRow != NULL);
+ SkASSERT(dstStartRow != nullptr);
SkASSERT(numRows <= (uint32_t) dstInfo.height());
// Calculate bytes to fill. We use getSafeSize since the last row may not be padded.
@@ -724,7 +724,7 @@ void SkSwizzler::Fill(void* dstStartRow, const SkImageInfo& dstInfo, size_t dstR
case kN32_SkColorType:
// Assume input is an index if we have a color table
uint32_t color;
- if (NULL != colorTable) {
+ if (nullptr != colorTable) {
SkASSERT(colorOrIndex == (uint8_t) colorOrIndex);
color = colorTable[colorOrIndex];
// Otherwise, assume the input is a color
« no previous file with comments | « src/codec/SkSwizzler.h ('k') | src/codec/SkWebpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698