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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 683203002: Revert of Patch to remove constant attributes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 65a7cdaa63cd326e633e64670a2c32d117f7522f..28d15174238d8ad198cc6a3dee39866cb2ef4a8a 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -55,9 +55,7 @@
// if we have a vertex shader(we don't only if we are using NVPR or NVPR ES), then we may have
// to setup a few more things like builtin vertex attributes
- bool hasVertexShader = !(header.fUseNvpr &&
- gpu->glPathRendering()->texturingMode() ==
- GrGLPathRendering::FixedFunction_TexturingMode);
+ bool hasVertexShader = !header.fUseFragShaderOnly;
if (hasVertexShader) {
pb->fVS.setupLocalCoords();
pb->fVS.transformGLToSkiaCoords();
@@ -94,15 +92,18 @@
GrGpu::DrawType drawType,
bool hasGeometryProcessor,
GrGpuGL* gpu) {
- if (desc.getHeader().fUseNvpr) {
+ if (desc.getHeader().fUseFragShaderOnly) {
SkASSERT(gpu->glCaps().pathRenderingSupport());
+ SkASSERT(gpu->glPathRendering()->texturingMode() ==
+ GrGLPathRendering::FixedFunction_TexturingMode);
SkASSERT(!hasGeometryProcessor);
- if (gpu->glPathRendering()->texturingMode() ==
- GrGLPathRendering::FixedFunction_TexturingMode) {
- return SkNEW_ARGS(GrGLLegacyNvprProgramBuilder, (gpu, optState, desc));
- } else {
- return SkNEW_ARGS(GrGLNvprProgramBuilder, (gpu, optState, desc));
- }
+ return SkNEW_ARGS(GrGLLegacyNvprProgramBuilder, (gpu, optState, desc));
+ } else if (GrGpu::IsPathRenderingDrawType(drawType)) {
+ SkASSERT(gpu->glCaps().pathRenderingSupport());
+ SkASSERT(gpu->glPathRendering()->texturingMode() ==
+ GrGLPathRendering::SeparableShaders_TexturingMode);
+ SkASSERT(!hasGeometryProcessor);
+ return SkNEW_ARGS(GrGLNvprProgramBuilder, (gpu, optState, desc));
} else {
return SkNEW_ARGS(GrGLProgramBuilder, (gpu, optState, desc));
}
@@ -419,9 +420,7 @@
this->cleanupProgram(programID, shadersToDelete);
return NULL;
}
- if (!(this->header().fUseNvpr &&
- fGpu->glPathRendering()->texturingMode() ==
- GrGLPathRendering::FixedFunction_TexturingMode)) {
+ if (!this->header().fUseFragShaderOnly) {
if (!fVS.compileAndAttachShaders(programID, &shadersToDelete)) {
this->cleanupProgram(programID, shadersToDelete);
return NULL;
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698