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

Unified Diff: src/core/SkBitmapController.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/SkBitmapController.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapController.cpp
diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp
index fb54388a7e063904162b45f07b4a790d1b7fb184..e4b4199c6955941655db0dd4f67c503a7757396a 100644
--- a/src/core/SkBitmapController.cpp
+++ b/src/core/SkBitmapController.cpp
@@ -16,7 +16,7 @@ static bool valid_for_drawing(const SkBitmap& bm) {
if (0 == bm.width() || 0 == bm.height()) {
return false; // nothing to draw
}
- if (NULL == bm.pixelRef()) {
+ if (nullptr == bm.pixelRef()) {
return false; // no pixels to read
}
if (bm.getTexture()) {
@@ -38,14 +38,14 @@ SkBitmapController::State* SkBitmapController::requestBitmap(const SkBitmap& bm,
void* storage, size_t storageSize) {
if (!valid_for_drawing(bm)) {
- return NULL;
+ return nullptr;
}
State* state = this->onRequestBitmap(bm, inv, quality, storage, storageSize);
if (state) {
- if (NULL == state->fPixmap.addr()) {
+ if (nullptr == state->fPixmap.addr()) {
SkInPlaceDeleteCheck(state, storage);
- state = NULL;
+ state = nullptr;
}
}
return state;
@@ -161,21 +161,21 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmap& origBi
fQuality = kLow_SkFilterQuality;
SkSize invScaleSize;
- if (!fInvMatrix.decomposeScale(&invScaleSize, NULL)) {
+ if (!fInvMatrix.decomposeScale(&invScaleSize, nullptr)) {
return false;
}
SkScalar invScale = SkScalarSqrt(invScaleSize.width() * invScaleSize.height());
if (invScale > SK_Scalar1) {
fCurrMip.reset(SkMipMapCache::FindAndRef(origBitmap));
- if (NULL == fCurrMip.get()) {
+ if (nullptr == fCurrMip.get()) {
fCurrMip.reset(SkMipMapCache::AddAndRef(origBitmap));
- if (NULL == fCurrMip.get()) {
+ if (nullptr == fCurrMip.get()) {
return false;
}
}
// diagnostic for a crasher...
- if (NULL == fCurrMip->data()) {
+ if (nullptr == fCurrMip->data()) {
sk_throw();
}
@@ -191,7 +191,7 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmap& origBi
return fResultBitmap.installPixels(info, level.fPixels, level.fRowBytes);
} else {
// failed to extract, so release the mipmap
- fCurrMip.reset(NULL);
+ fCurrMip.reset(nullptr);
}
}
return false;
@@ -213,7 +213,7 @@ SkDefaultBitmapControllerState::SkDefaultBitmapControllerState(const SkBitmap& s
SkASSERT(fQuality <= kLow_SkFilterQuality);
// fResultBitmap.getPixels() may be null, but our caller knows to check fPixmap.addr()
- // and will destroy us if it is NULL.
+ // and will destroy us if it is nullptr.
fPixmap.reset(fResultBitmap.info(), fResultBitmap.getPixels(), fResultBitmap.rowBytes(),
fResultBitmap.getColorTable());
}
« no previous file with comments | « src/core/SkBitmapController.h ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698