| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2015 Google Inc. | 2  * Copyright 2015 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #include "glsl/GrGLSLVarying.h" | 8 #include "glsl/GrGLSLVarying.h" | 
| 9 | 9 | 
| 10 #include "glsl/GrGLSLProgramBuilder.h" | 10 #include "glsl/GrGLSLProgramBuilder.h" | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 89     } | 89     } | 
| 90     fVertexInputs.push_back(var); | 90     fVertexInputs.push_back(var); | 
| 91 } | 91 } | 
| 92 | 92 | 
| 93 void GrGLSLVaryingHandler::setNoPerspective() { | 93 void GrGLSLVaryingHandler::setNoPerspective() { | 
| 94     const GrGLSLCaps& caps = *fProgramBuilder->glslCaps(); | 94     const GrGLSLCaps& caps = *fProgramBuilder->glslCaps(); | 
| 95     if (!caps.noperspectiveInterpolationSupport()) { | 95     if (!caps.noperspectiveInterpolationSupport()) { | 
| 96         return; | 96         return; | 
| 97     } | 97     } | 
| 98     if (const char* extension = caps.noperspectiveInterpolationExtensionString()
     ) { | 98     if (const char* extension = caps.noperspectiveInterpolationExtensionString()
     ) { | 
| 99         int bit = 1 << GrGLSLFragmentShaderBuilder::kNoPerspectiveInterpolation_
     GLSLPrivateFeature; | 99         int bit = 1 << GrGLSLFragmentBuilder::kNoPerspectiveInterpolation_GLSLPr
     ivateFeature; | 
| 100         fProgramBuilder->fVS.addFeature(bit, extension); | 100         fProgramBuilder->fVS.addFeature(bit, extension); | 
| 101         if (fProgramBuilder->primitiveProcessor().willUseGeoShader()) { | 101         if (fProgramBuilder->primitiveProcessor().willUseGeoShader()) { | 
| 102             fProgramBuilder->fGS.addFeature(bit, extension); | 102             fProgramBuilder->fGS.addFeature(bit, extension); | 
| 103         } | 103         } | 
| 104         fProgramBuilder->fFS.addFeature(bit, extension); | 104         fProgramBuilder->fFS.addFeature(bit, extension); | 
| 105     } | 105     } | 
| 106     fDefaultInterpolationModifier = "noperspective"; | 106     fDefaultInterpolationModifier = "noperspective"; | 
| 107 } | 107 } | 
| 108 | 108 | 
| 109 void GrGLSLVaryingHandler::finalize() { | 109 void GrGLSLVaryingHandler::finalize() { | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 151 } | 151 } | 
| 152 | 152 | 
| 153 void GrGLSLVaryingHandler::getFragDecls(SkString* inputDecls, SkString* outputDe
     cls) const { | 153 void GrGLSLVaryingHandler::getFragDecls(SkString* inputDecls, SkString* outputDe
     cls) const { | 
| 154     // We should not have any outputs in the fragment shader when using version 
     1.10 | 154     // We should not have any outputs in the fragment shader when using version 
     1.10 | 
| 155     SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() 
     || | 155     SkASSERT(k110_GrGLSLGeneration != fProgramBuilder->glslCaps()->generation() 
     || | 
| 156              fFragOutputs.empty()); | 156              fFragOutputs.empty()); | 
| 157     this->appendDecls(fFragInputs, inputDecls); | 157     this->appendDecls(fFragInputs, inputDecls); | 
| 158     this->appendDecls(fFragOutputs, outputDecls); | 158     this->appendDecls(fFragOutputs, outputDecls); | 
| 159 } | 159 } | 
| 160 | 160 | 
| OLD | NEW | 
|---|