| 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 "gl/builders/GrGLProgramBuilder.h" | 8 #include "gl/builders/GrGLProgramBuilder.h" |
| 9 #include "GrGLProgramDesc.h" | 9 #include "GrGLProgramDesc.h" |
| 10 #include "GrBackendEffectFactory.h" | 10 #include "GrBackendEffectFactory.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 if ((covIsSolidWhite || !inputCoverageIsUsed) && !skipCoverage) { | 236 if ((covIsSolidWhite || !inputCoverageIsUsed) && !skipCoverage) { |
| 237 header->fCoverageInput = kAllOnes_ColorInput; | 237 header->fCoverageInput = kAllOnes_ColorInput; |
| 238 } else if (defaultToUniformInputs && !requiresCoverageAttrib && inputCoverag
eIsUsed) { | 238 } else if (defaultToUniformInputs && !requiresCoverageAttrib && inputCoverag
eIsUsed) { |
| 239 header->fCoverageInput = kUniform_ColorInput; | 239 header->fCoverageInput = kUniform_ColorInput; |
| 240 } else { | 240 } else { |
| 241 header->fCoverageInput = kAttribute_ColorInput; | 241 header->fCoverageInput = kAttribute_ColorInput; |
| 242 header->fRequiresVertexShader = true; | 242 header->fRequiresVertexShader = true; |
| 243 } | 243 } |
| 244 | 244 |
| 245 if (readsDst) { | 245 if (readsDst) { |
| 246 SkASSERT(NULL != dstCopy || gpu->caps()->dstReadInShaderSupport()); | 246 SkASSERT(dstCopy || gpu->caps()->dstReadInShaderSupport()); |
| 247 const GrTexture* dstCopyTexture = NULL; | 247 const GrTexture* dstCopyTexture = NULL; |
| 248 if (NULL != dstCopy) { | 248 if (dstCopy) { |
| 249 dstCopyTexture = dstCopy->texture(); | 249 dstCopyTexture = dstCopy->texture(); |
| 250 } | 250 } |
| 251 header->fDstReadKey = GrGLFragmentShaderBuilder::KeyForDstRead(dstCopyTe
xture, | 251 header->fDstReadKey = GrGLFragmentShaderBuilder::KeyForDstRead(dstCopyTe
xture, |
| 252 gpu->glCaps()); | 252 gpu->glCaps()); |
| 253 SkASSERT(0 != header->fDstReadKey); | 253 SkASSERT(0 != header->fDstReadKey); |
| 254 } else { | 254 } else { |
| 255 header->fDstReadKey = 0; | 255 header->fDstReadKey = 0; |
| 256 } | 256 } |
| 257 | 257 |
| 258 if (readFragPosition) { | 258 if (readFragPosition) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 *checksum = 0; | 355 *checksum = 0; |
| 356 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k
eyLength); | 356 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k
eyLength); |
| 357 } | 357 } |
| 358 | 358 |
| 359 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { | 359 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { |
| 360 size_t keyLength = other.keyLength(); | 360 size_t keyLength = other.keyLength(); |
| 361 fKey.reset(keyLength); | 361 fKey.reset(keyLength); |
| 362 memcpy(fKey.begin(), other.fKey.begin(), keyLength); | 362 memcpy(fKey.begin(), other.fKey.begin(), keyLength); |
| 363 return *this; | 363 return *this; |
| 364 } | 364 } |
| OLD | NEW |