| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2013 Google Inc. | 2  * Copyright 2013 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 "GrGLProgramDesc.h" | 8 #include "GrGLProgramDesc.h" | 
| 9 #include "GrBackendEffectFactory.h" | 9 #include "GrBackendEffectFactory.h" | 
| 10 #include "GrDrawEffect.h" | 10 #include "GrDrawEffect.h" | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 89             desc->fEffectKeys[s] = factory.glEffectKey(drawEffect, gpu->glCaps()
     ); | 89             desc->fEffectKeys[s] = factory.glEffectKey(drawEffect, gpu->glCaps()
     ); | 
| 90             if (effect->willReadDst()) { | 90             if (effect->willReadDst()) { | 
| 91                 readsDst = true; | 91                 readsDst = true; | 
| 92             } | 92             } | 
| 93         } else { | 93         } else { | 
| 94             desc->fEffectKeys[s] = 0; | 94             desc->fEffectKeys[s] = 0; | 
| 95         } | 95         } | 
| 96     } | 96     } | 
| 97 | 97 | 
| 98     if (readsDst) { | 98     if (readsDst) { | 
| 99         GrAssert(NULL != dstCopy); | 99         GrAssert(NULL != dstCopy || gpu->caps()->dstReadInShaderSupport()); | 
| 100         desc->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstCopy->texture(), gp
     u->glCaps()); | 100         const GrTexture* dstCopyTexture = NULL; | 
|  | 101         if (NULL != dstCopy) { | 
|  | 102             dstCopyTexture = dstCopy->texture(); | 
|  | 103         } | 
|  | 104         desc->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstCopyTexture, gpu->g
     lCaps()); | 
| 101         GrAssert(0 != desc->fDstRead); | 105         GrAssert(0 != desc->fDstRead); | 
| 102     } else { | 106     } else { | 
| 103         desc->fDstRead = 0; | 107         desc->fDstRead = 0; | 
| 104     } | 108     } | 
| 105 | 109 | 
| 106     desc->fCoverageOutput = kModulate_CoverageOutput; | 110     desc->fCoverageOutput = kModulate_CoverageOutput; | 
| 107 | 111 | 
| 108     // Currently the experimental GS will only work with triangle prims (and it 
     doesn't do anything | 112     // Currently the experimental GS will only work with triangle prims (and it 
     doesn't do anything | 
| 109     // other than pass through values from the VS to the FS anyway). | 113     // other than pass through values from the VS to the FS anyway). | 
| 110 #if GR_GL_EXPERIMENTAL_GS | 114 #if GR_GL_EXPERIMENTAL_GS | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 187 | 191 | 
| 188     if (requiresCoverageAttrib) { | 192     if (requiresCoverageAttrib) { | 
| 189         desc->fCoverageAttributeIndex = drawState.coverageVertexAttributeIndex()
     ; | 193         desc->fCoverageAttributeIndex = drawState.coverageVertexAttributeIndex()
     ; | 
| 190     } else if (GrGLProgramDesc::kAttribute_ColorInput == desc->fCoverageInput) { | 194     } else if (GrGLProgramDesc::kAttribute_ColorInput == desc->fCoverageInput) { | 
| 191         GrAssert(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt); | 195         GrAssert(availableAttributeIndex < GrDrawState::kMaxVertexAttribCnt); | 
| 192         desc->fCoverageAttributeIndex = availableAttributeIndex; | 196         desc->fCoverageAttributeIndex = availableAttributeIndex; | 
| 193     } else { | 197     } else { | 
| 194         desc->fCoverageAttributeIndex = -1; | 198         desc->fCoverageAttributeIndex = -1; | 
| 195     } | 199     } | 
| 196 } | 200 } | 
| OLD | NEW | 
|---|