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

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

Issue 1110553003: Remove legacy NVPR support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 8 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/builders/GrGLFragmentShaderBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | 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 3aa4c6a2ca9afbb80fa5ab33d24a9b1cf17be731..e65ea880c3ec41d1eb216308955f96ffe9c19000 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -395,19 +395,15 @@ GrGLProgram* GrGLProgramBuilder::finalize() {
// compile shaders and bind attributes / uniforms
SkTDArray<GrGLuint> shadersToDelete;
- // Legacy nvpr will not compile with a vertex shader, but newer nvpr requires a dummy vertex
- // shader
- bool useNvpr = primitiveProcessor().isPathRendering();
- if (!(useNvpr && fGpu->glCaps().nvprSupport() == GrGLCaps::kLegacy_NvprSupport)) {
- if (!fVS.compileAndAttachShaders(programID, &shadersToDelete)) {
- this->cleanupProgram(programID, shadersToDelete);
- return NULL;
- }
+ if (!fVS.compileAndAttachShaders(programID, &shadersToDelete)) {
+ this->cleanupProgram(programID, shadersToDelete);
+ return NULL;
+ }
- // Non fixed function NVPR actually requires a vertex shader to compile
- if (!useNvpr) {
- fVS.bindVertexAttributes(programID);
- }
+ // NVPR actually requires a vertex shader to compile
+ bool useNvpr = primitiveProcessor().isPathRendering();
+ if (!useNvpr) {
+ fVS.bindVertexAttributes(programID);
}
if (!fFS.compileAndAttachShaders(programID, &shadersToDelete)) {
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698