aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/builders
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/builders')
-rw-r--r--src/gpu/gl/builders/GrGLFragmentShaderBuilder.h2
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp18
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.h10
-rw-r--r--src/gpu/gl/builders/GrGLShaderBuilder.cpp2
-rw-r--r--src/gpu/gl/builders/GrGLShaderBuilder.h2
-rw-r--r--src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp2
6 files changed, 18 insertions, 18 deletions
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
index 8746fffb8b..912de0a645 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
@@ -112,7 +112,7 @@ class GrGLXPFragmentBuilder : public GrGLFragmentBuilder {
public:
GrGLXPFragmentBuilder(GrGLProgramBuilder* program) : INHERITED(program) {}
- /** Returns the variable name that holds the color of the destination pixel. This may be NULL if
+ /** Returns the variable name that holds the color of the destination pixel. This may be nullptr if
no effect advertised that it will read the destination. */
virtual const char* dstColor() = 0;
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index d0eb4d4865..e6e93e9f28 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -43,7 +43,7 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp
GrGLSLExpr4 inputCoverage;
if (!pb->emitAndInstallProcs(&inputColor, &inputCoverage)) {
- return NULL;
+ return nullptr;
}
return pb->finalize();
@@ -69,8 +69,8 @@ GrGLProgramBuilder::GrGLProgramBuilder(GrGLGpu* gpu, const DrawArgs& args)
, fFS(this, args.fDesc->header().fFragPosKey)
, fOutOfStage(true)
, fStageIndex(-1)
- , fGeometryProcessor(NULL)
- , fXferProcessor(NULL)
+ , fGeometryProcessor(nullptr)
+ , fXferProcessor(nullptr)
, fArgs(args)
, fGpu(gpu)
, fUniforms(kVarsPerBlock)
@@ -252,7 +252,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrFragmentProcessor& fp,
openBrace.printf("{ // Stage %d, %s\n", fStageIndex, fp.name());
fFS.codeAppend(openBrace.c_str());
- this->emitAndInstallProc(fp, index, output->c_str(), input.isOnes() ? NULL : input.c_str());
+ this->emitAndInstallProc(fp, index, output->c_str(), input.isOnes() ? nullptr : input.c_str());
fFS.codeAppend("}");
}
@@ -390,7 +390,7 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
GrGLuint programID;
GL_CALL_RET(programID, CreateProgram());
if (0 == programID) {
- return NULL;
+ return nullptr;
}
// compile shaders and bind attributes / uniforms
@@ -398,7 +398,7 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
if (!fVS.compileAndAttachShaders(programID, &shadersToDelete)) {
this->cleanupProgram(programID, shadersToDelete);
- return NULL;
+ return nullptr;
}
// NVPR actually requires a vertex shader to compile
@@ -409,7 +409,7 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
if (!fFS.compileAndAttachShaders(programID, &shadersToDelete)) {
this->cleanupProgram(programID, shadersToDelete);
- return NULL;
+ return nullptr;
}
this->bindProgramResourceLocations(programID);
@@ -432,7 +432,7 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
}
void GrGLProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
- bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != NULL;
+ bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != nullptr;
if (usingBindUniform) {
int count = fUniforms.count();
for (int i = 0; i < count; ++i) {
@@ -469,7 +469,7 @@ bool GrGLProgramBuilder::checkLinkStatus(GrGLuint programID) {
}
void GrGLProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) {
- bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != NULL;
+ bool usingBindUniform = fGpu->glInterface()->fFunctions.fBindUniformLocation != nullptr;
if (!usingBindUniform) {
int count = fUniforms.count();
for (int i = 0; i < count; ++i) {
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h
index 06d0fa0744..1d5e5fbcfe 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.h
@@ -49,14 +49,14 @@ public:
/** Add a uniform variable to the current program, that has visibility in one or more shaders.
visibility is a bitfield of ShaderVisibility values indicating from which shaders the
uniform should be accessible. At least one bit must be set. Geometry shader uniforms are not
- supported at this time. The actual uniform name will be mangled. If outName is not NULL then
+ supported at this time. The actual uniform name will be mangled. If outName is not nullptr then
it will refer to the final uniform name after return. Use the addUniformArray variant to add
an array of uniforms. */
UniformHandle addUniform(uint32_t visibility,
GrSLType type,
GrSLPrecision precision,
const char* name,
- const char** outName = NULL) {
+ const char** outName = nullptr) {
return this->addUniformArray(visibility, type, precision, name, 0, outName);
}
@@ -66,7 +66,7 @@ public:
GrSLPrecision precision,
const char* name,
int arrayCount,
- const char** outName = NULL) = 0;
+ const char** outName = nullptr) = 0;
virtual const GrGLShaderVar& getUniformVariable(UniformHandle u) const = 0;
@@ -105,8 +105,8 @@ protected:
};
GrGLVarying(GrSLType type, Varying varying)
- : fVarying(varying), fType(type), fVsOut(NULL), fGsIn(NULL), fGsOut(NULL),
- fFsIn(NULL) {}
+ : fVarying(varying), fType(type), fVsOut(nullptr), fGsIn(nullptr), fGsOut(nullptr),
+ fFsIn(nullptr) {}
Varying fVarying;
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
index f0408afe21..84c3c6522c 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
@@ -58,7 +58,7 @@ GrGLShaderBuilder::GrGLShaderBuilder(GrGLProgramBuilder* program)
// We push back some dummy pointers which will later become our header
for (int i = 0; i <= kCode; i++) {
fShaderStrings.push_back();
- fCompilerStrings.push_back(NULL);
+ fCompilerStrings.push_back(nullptr);
fCompilerStringLengths.push_back(0);
}
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.h b/src/gpu/gl/builders/GrGLShaderBuilder.h
index 4a6d2e13d8..427c6590ac 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.h
@@ -57,7 +57,7 @@ public:
/** Does the work of appendTextureLookup and modulates the result by modulation. The result is
always a vec4. modulation and the swizzle specified by TextureSampler must both be vec4 or
- float. If modulation is "" or NULL it this function acts as though appendTextureLookup were
+ float. If modulation is "" or nullptr it this function acts as though appendTextureLookup were
called. */
void appendTextureLookupAndModulate(const char* modulation,
const TextureSampler&,
diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
index 983de21021..0189932cac 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -15,7 +15,7 @@
GrGLVertexBuilder::GrGLVertexBuilder(GrGLProgramBuilder* program)
: INHERITED(program)
- , fRtAdjustName(NULL) {
+ , fRtAdjustName(nullptr) {
}
void GrGLVertexBuilder::addVarying(const char* name, GrGLVarying* v) {