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

Unified Diff: src/core/SkShader.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/SkSemaphore.cpp ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 6da73fc45faf01f206c6c5dc737398ffa06792d9..51a8017b5e7249c2ed91b55a75acc00d3575af9b 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -75,7 +75,7 @@ bool SkShader::computeTotalInverse(const ContextRec& rec, SkMatrix* totalInverse
bool SkShader::asLuminanceColor(SkColor* colorPtr) const {
SkColor storage;
- if (NULL == colorPtr) {
+ if (nullptr == colorPtr) {
colorPtr = &storage;
}
if (this->onAsLuminanceColor(colorPtr)) {
@@ -86,14 +86,14 @@ bool SkShader::asLuminanceColor(SkColor* colorPtr) const {
}
SkShader::Context* SkShader::createContext(const ContextRec& rec, void* storage) const {
- if (!this->computeTotalInverse(rec, NULL)) {
- return NULL;
+ if (!this->computeTotalInverse(rec, nullptr)) {
+ return nullptr;
}
return this->onCreateContext(rec, storage);
}
SkShader::Context* SkShader::onCreateContext(const ContextRec& rec, void*) const {
- return NULL;
+ return nullptr;
}
size_t SkShader::contextSize() const {
@@ -114,7 +114,7 @@ SkShader::Context::Context(const SkShader& shader, const ContextRec& rec)
SkShader::Context::~Context() {}
SkShader::Context::ShadeProc SkShader::Context::asAShadeProc(void** ctx) {
- return NULL;
+ return nullptr;
}
#include "SkColorPriv.h"
@@ -195,7 +195,7 @@ SkShader::Context::MatrixClass SkShader::Context::ComputeMatrixClass(const SkMat
MatrixClass mc = kLinear_MatrixClass;
if (mat.hasPerspective()) {
- if (mat.fixedStepInX(0, NULL, NULL)) {
+ if (mat.fixedStepInX(0, nullptr, nullptr)) {
mc = kFixedStepInX_MatrixClass;
} else {
mc = kPerspective_MatrixClass;
@@ -221,7 +221,7 @@ bool SkShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&,
}
SkShader* SkShader::refAsALocalMatrixShader(SkMatrix*) const {
- return NULL;
+ return nullptr;
}
SkShader* SkShader::CreateEmptyShader() { return new SkEmptyShader; }
@@ -230,7 +230,7 @@ SkShader* SkShader::CreateColorShader(SkColor color) { return new SkColorShader(
SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix) {
- return SkCreateBitmapShader(src, tmx, tmy, localMatrix, NULL);
+ return SkCreateBitmapShader(src, tmx, tmy, localMatrix, nullptr);
}
SkShader* SkShader::CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy,
@@ -339,7 +339,7 @@ SkShader::GradientType SkColorShader::asAGradient(GradientInfo* info) const {
bool SkColorShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix&,
const SkMatrix*, GrColor* paintColor,
GrProcessorDataManager*, GrFragmentProcessor** fp) const {
- *fp = NULL;
+ *fp = nullptr;
SkColor skColor = fColor;
U8CPU newA = SkMulDiv255Round(SkColorGetA(fColor), paint.getAlpha());
*paintColor = SkColor2GrColor(SkColorSetA(skColor, newA));
« no previous file with comments | « src/core/SkSemaphore.cpp ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698