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

Unified Diff: src/gpu/gl/GrGLProgram.cpp

Issue 674543004: OptState owns program descriptor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaup Created 6 years, 2 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/gpu/gl/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index bfa5f3cbc155e7f18581e361933653d40bdaf357..f152173e990d650c7d055fe71730a5dce5b5c034 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -56,7 +56,7 @@ static SkMatrix get_transform_matrix(const GrFragmentStage& processorStage,
///////////////////////////////////////////////////////////////////////////////////////////////////
GrGLProgram::GrGLProgram(GrGpuGL* gpu,
- const GrGLProgramDesc& desc,
+ const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
const UniformInfoArray& uniforms,
@@ -201,12 +201,12 @@ void GrGLProgram::didSetData(GrGpu::DrawType drawType) {
}
void GrGLProgram::setColor(const GrOptDrawState& optState, GrColor color) {
- const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
+ const GrProgramDesc::KeyHeader& header = fDesc.header();
switch (header.fColorInput) {
- case GrGLProgramDesc::kAttribute_ColorInput:
+ case GrProgramDesc::kAttribute_ColorInput:
// Attribute case is handled in GrGpuGL::setupGeometry
break;
- case GrGLProgramDesc::kUniform_ColorInput:
+ case GrProgramDesc::kUniform_ColorInput:
if (fColor != color && fBuiltinUniformHandles.fColorUni.isValid()) {
// OpenGL ES doesn't support unsigned byte varieties of glUniform
GrGLfloat c[4];
@@ -215,7 +215,7 @@ void GrGLProgram::setColor(const GrOptDrawState& optState, GrColor color) {
fColor = color;
}
break;
- case GrGLProgramDesc::kAllOnes_ColorInput:
+ case GrProgramDesc::kAllOnes_ColorInput:
// Handled by shader creation
break;
default:
@@ -224,12 +224,12 @@ void GrGLProgram::setColor(const GrOptDrawState& optState, GrColor color) {
}
void GrGLProgram::setCoverage(const GrOptDrawState& optState, GrColor coverage) {
- const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
+ const GrProgramDesc::KeyHeader& header = fDesc.header();
switch (header.fCoverageInput) {
- case GrGLProgramDesc::kAttribute_ColorInput:
+ case GrProgramDesc::kAttribute_ColorInput:
// Attribute case is handled in GrGpuGL::setupGeometry
break;
- case GrGLProgramDesc::kUniform_ColorInput:
+ case GrProgramDesc::kUniform_ColorInput:
if (fCoverage != coverage) {
// OpenGL ES doesn't support unsigned byte varieties of glUniform
GrGLfloat c[4];
@@ -238,7 +238,7 @@ void GrGLProgram::setCoverage(const GrOptDrawState& optState, GrColor coverage)
fCoverage = coverage;
}
break;
- case GrGLProgramDesc::kAllOnes_ColorInput:
+ case GrProgramDesc::kAllOnes_ColorInput:
// Handled by shader creation
break;
default:
@@ -286,7 +286,7 @@ void GrGLProgram::onSetMatrixAndRenderTargetHeight(GrGpu::DrawType drawType,
/////////////////////////////////////////////////////////////////////////////////////////
GrGLNvprProgramBase::GrGLNvprProgramBase(GrGpuGL* gpu,
- const GrGLProgramDesc& desc,
+ const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
const UniformInfoArray& uniforms,
@@ -306,7 +306,7 @@ void GrGLNvprProgramBase::onSetMatrixAndRenderTargetHeight(GrGpu::DrawType drawT
/////////////////////////////////////////////////////////////////////////////////////////
GrGLNvprProgram::GrGLNvprProgram(GrGpuGL* gpu,
- const GrGLProgramDesc& desc,
+ const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
const UniformInfoArray& uniforms,
@@ -355,7 +355,7 @@ void GrGLNvprProgram::setTransformData(const GrFragmentStage& proc, GrGLInstalle
//////////////////////////////////////////////////////////////////////////////////////
GrGLLegacyNvprProgram::GrGLLegacyNvprProgram(GrGpuGL* gpu,
- const GrGLProgramDesc& desc,
+ const GrProgramDesc& desc,
const BuiltinUniformHandles& builtinUniforms,
GrGLuint programID,
const UniformInfoArray& uniforms,
« no previous file with comments | « src/gpu/gl/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698