| 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 "GrBezierEffect.h" | 8 #include "GrBezierEffect.h" |
| 9 | 9 |
| 10 #include "gl/GrGLProcessor.h" | 10 #include "gl/GrGLProcessor.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 static inline void GenKey(const GrGeometryProcessor&, | 22 static inline void GenKey(const GrGeometryProcessor&, |
| 23 const GrBatchTracker&, | 23 const GrBatchTracker&, |
| 24 const GrGLSLCaps&, | 24 const GrGLSLCaps&, |
| 25 GrProcessorKeyBuilder*); | 25 GrProcessorKeyBuilder*); |
| 26 | 26 |
| 27 virtual void setData(const GrGLProgramDataManager& pdman, | 27 virtual void setData(const GrGLProgramDataManager& pdman, |
| 28 const GrPrimitiveProcessor& primProc, | 28 const GrPrimitiveProcessor& primProc, |
| 29 const GrBatchTracker& bt) override { | 29 const GrBatchTracker& bt) override { |
| 30 const GrConicEffect& ce = primProc.cast<GrConicEffect>(); | 30 const GrConicEffect& ce = primProc.cast<GrConicEffect>(); |
| 31 this->setUniformViewMatrix(pdman, ce.viewMatrix()); | 31 |
| 32 if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMa
trix())) { |
| 33 fViewMatrix = ce.viewMatrix(); |
| 34 GrGLfloat viewMatrix[3 * 3]; |
| 35 GrGLGetMatrix<3>(viewMatrix, fViewMatrix); |
| 36 pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
| 37 } |
| 32 | 38 |
| 33 if (ce.color() != fColor) { | 39 if (ce.color() != fColor) { |
| 34 GrGLfloat c[4]; | 40 GrGLfloat c[4]; |
| 35 GrColorToRGBAFloat(ce.color(), c); | 41 GrColorToRGBAFloat(ce.color(), c); |
| 36 pdman.set4fv(fColorUniform, 1, c); | 42 pdman.set4fv(fColorUniform, 1, c); |
| 37 fColor = ce.color(); | 43 fColor = ce.color(); |
| 38 } | 44 } |
| 39 | 45 |
| 40 if (ce.coverageScale() != 0xff && ce.coverageScale() != fCoverageScale)
{ | 46 if (ce.coverageScale() != 0xff && ce.coverageScale() != fCoverageScale)
{ |
| 41 pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(ce.coverag
eScale())); | 47 pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(ce.coverag
eScale())); |
| 42 fCoverageScale = ce.coverageScale(); | 48 fCoverageScale = ce.coverageScale(); |
| 43 } | 49 } |
| 44 } | 50 } |
| 45 | 51 |
| 46 void setTransformData(const GrPrimitiveProcessor& primProc, | 52 void setTransformData(const GrPrimitiveProcessor& primProc, |
| 47 const GrGLProgramDataManager& pdman, | 53 const GrGLProgramDataManager& pdman, |
| 48 int index, | 54 int index, |
| 49 const SkTArray<const GrCoordTransform*, true>& transfo
rms) override { | 55 const SkTArray<const GrCoordTransform*, true>& transfo
rms) override { |
| 50 this->setTransformDataHelper<GrConicEffect>(primProc, pdman, index, tran
sforms); | 56 this->setTransformDataHelper<GrConicEffect>(primProc, pdman, index, tran
sforms); |
| 51 } | 57 } |
| 52 | 58 |
| 53 private: | 59 private: |
| 60 SkMatrix fViewMatrix; |
| 54 GrColor fColor; | 61 GrColor fColor; |
| 55 uint8_t fCoverageScale; | 62 uint8_t fCoverageScale; |
| 56 GrPrimitiveEdgeType fEdgeType; | 63 GrPrimitiveEdgeType fEdgeType; |
| 57 UniformHandle fColorUniform; | 64 UniformHandle fColorUniform; |
| 58 UniformHandle fCoverageScaleUniform; | 65 UniformHandle fCoverageScaleUniform; |
| 66 UniformHandle fViewMatrixUniform; |
| 59 | 67 |
| 60 typedef GrGLGeometryProcessor INHERITED; | 68 typedef GrGLGeometryProcessor INHERITED; |
| 61 }; | 69 }; |
| 62 | 70 |
| 63 GrGLConicEffect::GrGLConicEffect(const GrGeometryProcessor& processor, | 71 GrGLConicEffect::GrGLConicEffect(const GrGeometryProcessor& processor, |
| 64 const GrBatchTracker& bt) | 72 const GrBatchTracker& bt) |
| 65 : fColor(GrColor_ILLEGAL), fCoverageScale(0xff) { | 73 : fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL), fCoverage
Scale(0xff) { |
| 66 const GrConicEffect& ce = processor.cast<GrConicEffect>(); | 74 const GrConicEffect& ce = processor.cast<GrConicEffect>(); |
| 67 fEdgeType = ce.getEdgeType(); | 75 fEdgeType = ce.getEdgeType(); |
| 68 } | 76 } |
| 69 | 77 |
| 70 void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { | 78 void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
| 71 GrGLGPBuilder* pb = args.fPB; | 79 GrGLGPBuilder* pb = args.fPB; |
| 72 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); | 80 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
| 73 const GrConicEffect& gp = args.fGP.cast<GrConicEffect>(); | 81 const GrConicEffect& gp = args.fGP.cast<GrConicEffect>(); |
| 74 | 82 |
| 75 // emit attributes | 83 // emit attributes |
| 76 vsBuilder->emitAttributes(gp); | 84 vsBuilder->emitAttributes(gp); |
| 77 | 85 |
| 78 GrGLVertToFrag v(kVec4f_GrSLType); | 86 GrGLVertToFrag v(kVec4f_GrSLType); |
| 79 args.fPB->addVarying("ConicCoeffs", &v); | 87 args.fPB->addVarying("ConicCoeffs", &v); |
| 80 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inConicCoeffs()->fName); | 88 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inConicCoeffs()->fName); |
| 81 | 89 |
| 82 // Setup pass through color | 90 // Setup pass through color |
| 83 if (!gp.colorIgnored()) { | 91 if (!gp.colorIgnored()) { |
| 84 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); | 92 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); |
| 85 } | 93 } |
| 86 | 94 |
| 87 // Setup position | 95 // Setup position |
| 88 this->setupPosition(pb, gpArgs, gp.inPosition()->fName, gp.viewMatrix()); | 96 this->setupPosition(pb, gpArgs, gp.inPosition()->fName, gp.viewMatrix(), &fV
iewMatrixUniform); |
| 89 | 97 |
| 90 // emit transforms with position | 98 // emit transforms with position |
| 91 this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.lo
calMatrix(), | 99 this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.lo
calMatrix(), |
| 92 args.fTransformsIn, args.fTransformsOut); | 100 args.fTransformsIn, args.fTransformsOut); |
| 93 | 101 |
| 94 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); | 102 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
| 95 fsBuilder->codeAppend("float edgeAlpha;"); | 103 fsBuilder->codeAppend("float edgeAlpha;"); |
| 96 | 104 |
| 97 switch (fEdgeType) { | 105 switch (fEdgeType) { |
| 98 case kHairlineAA_GrProcessorEdgeType: { | 106 case kHairlineAA_GrProcessorEdgeType: { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 246 |
| 239 static inline void GenKey(const GrGeometryProcessor&, | 247 static inline void GenKey(const GrGeometryProcessor&, |
| 240 const GrBatchTracker&, | 248 const GrBatchTracker&, |
| 241 const GrGLSLCaps&, | 249 const GrGLSLCaps&, |
| 242 GrProcessorKeyBuilder*); | 250 GrProcessorKeyBuilder*); |
| 243 | 251 |
| 244 virtual void setData(const GrGLProgramDataManager& pdman, | 252 virtual void setData(const GrGLProgramDataManager& pdman, |
| 245 const GrPrimitiveProcessor& primProc, | 253 const GrPrimitiveProcessor& primProc, |
| 246 const GrBatchTracker& bt) override { | 254 const GrBatchTracker& bt) override { |
| 247 const GrQuadEffect& qe = primProc.cast<GrQuadEffect>(); | 255 const GrQuadEffect& qe = primProc.cast<GrQuadEffect>(); |
| 248 this->setUniformViewMatrix(pdman, qe.viewMatrix()); | 256 |
| 257 if (!qe.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(qe.viewMa
trix())) { |
| 258 fViewMatrix = qe.viewMatrix(); |
| 259 GrGLfloat viewMatrix[3 * 3]; |
| 260 GrGLGetMatrix<3>(viewMatrix, fViewMatrix); |
| 261 pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
| 262 } |
| 249 | 263 |
| 250 if (qe.color() != fColor) { | 264 if (qe.color() != fColor) { |
| 251 GrGLfloat c[4]; | 265 GrGLfloat c[4]; |
| 252 GrColorToRGBAFloat(qe.color(), c); | 266 GrColorToRGBAFloat(qe.color(), c); |
| 253 pdman.set4fv(fColorUniform, 1, c); | 267 pdman.set4fv(fColorUniform, 1, c); |
| 254 fColor = qe.color(); | 268 fColor = qe.color(); |
| 255 } | 269 } |
| 256 | 270 |
| 257 if (qe.coverageScale() != 0xff && qe.coverageScale() != fCoverageScale)
{ | 271 if (qe.coverageScale() != 0xff && qe.coverageScale() != fCoverageScale)
{ |
| 258 pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(qe.coverag
eScale())); | 272 pdman.set1f(fCoverageScaleUniform, GrNormalizeByteToFloat(qe.coverag
eScale())); |
| 259 fCoverageScale = qe.coverageScale(); | 273 fCoverageScale = qe.coverageScale(); |
| 260 } | 274 } |
| 261 } | 275 } |
| 262 | 276 |
| 263 void setTransformData(const GrPrimitiveProcessor& primProc, | 277 void setTransformData(const GrPrimitiveProcessor& primProc, |
| 264 const GrGLProgramDataManager& pdman, | 278 const GrGLProgramDataManager& pdman, |
| 265 int index, | 279 int index, |
| 266 const SkTArray<const GrCoordTransform*, true>& transfo
rms) override { | 280 const SkTArray<const GrCoordTransform*, true>& transfo
rms) override { |
| 267 this->setTransformDataHelper<GrQuadEffect>(primProc, pdman, index, trans
forms); | 281 this->setTransformDataHelper<GrQuadEffect>(primProc, pdman, index, trans
forms); |
| 268 } | 282 } |
| 269 | 283 |
| 270 private: | 284 private: |
| 285 SkMatrix fViewMatrix; |
| 271 GrColor fColor; | 286 GrColor fColor; |
| 272 uint8_t fCoverageScale; | 287 uint8_t fCoverageScale; |
| 273 GrPrimitiveEdgeType fEdgeType; | 288 GrPrimitiveEdgeType fEdgeType; |
| 274 UniformHandle fColorUniform; | 289 UniformHandle fColorUniform; |
| 275 UniformHandle fCoverageScaleUniform; | 290 UniformHandle fCoverageScaleUniform; |
| 291 UniformHandle fViewMatrixUniform; |
| 276 | 292 |
| 277 typedef GrGLGeometryProcessor INHERITED; | 293 typedef GrGLGeometryProcessor INHERITED; |
| 278 }; | 294 }; |
| 279 | 295 |
| 280 GrGLQuadEffect::GrGLQuadEffect(const GrGeometryProcessor& processor, | 296 GrGLQuadEffect::GrGLQuadEffect(const GrGeometryProcessor& processor, |
| 281 const GrBatchTracker& bt) | 297 const GrBatchTracker& bt) |
| 282 : fColor(GrColor_ILLEGAL), fCoverageScale(0xff) { | 298 : fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL), fCoverage
Scale(0xff) { |
| 283 const GrQuadEffect& ce = processor.cast<GrQuadEffect>(); | 299 const GrQuadEffect& ce = processor.cast<GrQuadEffect>(); |
| 284 fEdgeType = ce.getEdgeType(); | 300 fEdgeType = ce.getEdgeType(); |
| 285 } | 301 } |
| 286 | 302 |
| 287 void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { | 303 void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
| 288 GrGLGPBuilder* pb = args.fPB; | 304 GrGLGPBuilder* pb = args.fPB; |
| 289 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); | 305 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
| 290 const GrQuadEffect& gp = args.fGP.cast<GrQuadEffect>(); | 306 const GrQuadEffect& gp = args.fGP.cast<GrQuadEffect>(); |
| 291 | 307 |
| 292 // emit attributes | 308 // emit attributes |
| 293 vsBuilder->emitAttributes(gp); | 309 vsBuilder->emitAttributes(gp); |
| 294 | 310 |
| 295 GrGLVertToFrag v(kVec4f_GrSLType); | 311 GrGLVertToFrag v(kVec4f_GrSLType); |
| 296 args.fPB->addVarying("HairQuadEdge", &v); | 312 args.fPB->addVarying("HairQuadEdge", &v); |
| 297 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inHairQuadEdge()->fName); | 313 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inHairQuadEdge()->fName); |
| 298 | 314 |
| 299 // Setup pass through color | 315 // Setup pass through color |
| 300 if (!gp.colorIgnored()) { | 316 if (!gp.colorIgnored()) { |
| 301 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); | 317 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); |
| 302 } | 318 } |
| 303 | 319 |
| 304 // Setup position | 320 // Setup position |
| 305 this->setupPosition(pb, gpArgs, gp.inPosition()->fName, gp.viewMatrix()); | 321 this->setupPosition(pb, gpArgs, gp.inPosition()->fName, gp.viewMatrix(), &fV
iewMatrixUniform); |
| 306 | 322 |
| 307 // emit transforms with position | 323 // emit transforms with position |
| 308 this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.lo
calMatrix(), | 324 this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.lo
calMatrix(), |
| 309 args.fTransformsIn, args.fTransformsOut); | 325 args.fTransformsIn, args.fTransformsOut); |
| 310 | 326 |
| 311 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); | 327 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
| 312 fsBuilder->codeAppendf("float edgeAlpha;"); | 328 fsBuilder->codeAppendf("float edgeAlpha;"); |
| 313 | 329 |
| 314 switch (fEdgeType) { | 330 switch (fEdgeType) { |
| 315 case kHairlineAA_GrProcessorEdgeType: { | 331 case kHairlineAA_GrProcessorEdgeType: { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 458 |
| 443 static inline void GenKey(const GrGeometryProcessor&, | 459 static inline void GenKey(const GrGeometryProcessor&, |
| 444 const GrBatchTracker&, | 460 const GrBatchTracker&, |
| 445 const GrGLSLCaps&, | 461 const GrGLSLCaps&, |
| 446 GrProcessorKeyBuilder*); | 462 GrProcessorKeyBuilder*); |
| 447 | 463 |
| 448 virtual void setData(const GrGLProgramDataManager& pdman, | 464 virtual void setData(const GrGLProgramDataManager& pdman, |
| 449 const GrPrimitiveProcessor& primProc, | 465 const GrPrimitiveProcessor& primProc, |
| 450 const GrBatchTracker& bt) override { | 466 const GrBatchTracker& bt) override { |
| 451 const GrCubicEffect& ce = primProc.cast<GrCubicEffect>(); | 467 const GrCubicEffect& ce = primProc.cast<GrCubicEffect>(); |
| 452 this->setUniformViewMatrix(pdman, ce.viewMatrix()); | 468 |
| 469 if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMa
trix())) { |
| 470 fViewMatrix = ce.viewMatrix(); |
| 471 GrGLfloat viewMatrix[3 * 3]; |
| 472 GrGLGetMatrix<3>(viewMatrix, fViewMatrix); |
| 473 pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
| 474 } |
| 453 | 475 |
| 454 if (ce.color() != fColor) { | 476 if (ce.color() != fColor) { |
| 455 GrGLfloat c[4]; | 477 GrGLfloat c[4]; |
| 456 GrColorToRGBAFloat(ce.color(), c); | 478 GrColorToRGBAFloat(ce.color(), c); |
| 457 pdman.set4fv(fColorUniform, 1, c); | 479 pdman.set4fv(fColorUniform, 1, c); |
| 458 fColor = ce.color(); | 480 fColor = ce.color(); |
| 459 } | 481 } |
| 460 } | 482 } |
| 461 | 483 |
| 462 private: | 484 private: |
| 485 SkMatrix fViewMatrix; |
| 463 GrColor fColor; | 486 GrColor fColor; |
| 464 GrPrimitiveEdgeType fEdgeType; | 487 GrPrimitiveEdgeType fEdgeType; |
| 465 UniformHandle fColorUniform; | 488 UniformHandle fColorUniform; |
| 489 UniformHandle fViewMatrixUniform; |
| 466 | 490 |
| 467 typedef GrGLGeometryProcessor INHERITED; | 491 typedef GrGLGeometryProcessor INHERITED; |
| 468 }; | 492 }; |
| 469 | 493 |
| 470 GrGLCubicEffect::GrGLCubicEffect(const GrGeometryProcessor& processor, | 494 GrGLCubicEffect::GrGLCubicEffect(const GrGeometryProcessor& processor, |
| 471 const GrBatchTracker&) | 495 const GrBatchTracker&) |
| 472 : fColor(GrColor_ILLEGAL) { | 496 : fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL) { |
| 473 const GrCubicEffect& ce = processor.cast<GrCubicEffect>(); | 497 const GrCubicEffect& ce = processor.cast<GrCubicEffect>(); |
| 474 fEdgeType = ce.getEdgeType(); | 498 fEdgeType = ce.getEdgeType(); |
| 475 } | 499 } |
| 476 | 500 |
| 477 void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { | 501 void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
| 478 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); | 502 GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
| 479 const GrCubicEffect& gp = args.fGP.cast<GrCubicEffect>(); | 503 const GrCubicEffect& gp = args.fGP.cast<GrCubicEffect>(); |
| 480 | 504 |
| 481 // emit attributes | 505 // emit attributes |
| 482 vsBuilder->emitAttributes(gp); | 506 vsBuilder->emitAttributes(gp); |
| 483 | 507 |
| 484 GrGLVertToFrag v(kVec4f_GrSLType); | 508 GrGLVertToFrag v(kVec4f_GrSLType); |
| 485 args.fPB->addVarying("CubicCoeffs", &v, kHigh_GrSLPrecision); | 509 args.fPB->addVarying("CubicCoeffs", &v, kHigh_GrSLPrecision); |
| 486 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inCubicCoeffs()->fName); | 510 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inCubicCoeffs()->fName); |
| 487 | 511 |
| 488 // Setup pass through color | 512 // Setup pass through color |
| 489 if (!gp.colorIgnored()) { | 513 if (!gp.colorIgnored()) { |
| 490 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); | 514 this->setupUniformColor(args.fPB, args.fOutputColor, &fColorUniform); |
| 491 } | 515 } |
| 492 | 516 |
| 493 // Setup position | 517 // Setup position |
| 494 this->setupPosition(args.fPB, gpArgs, gp.inPosition()->fName, gp.viewMatrix(
)); | 518 this->setupPosition(args.fPB, gpArgs, gp.inPosition()->fName, gp.viewMatrix(
), |
| 519 &fViewMatrixUniform); |
| 495 | 520 |
| 496 // emit transforms with position | 521 // emit transforms with position |
| 497 this->emitTransforms(args.fPB, gpArgs->fPositionVar, gp.inPosition()->fName,
args.fTransformsIn, | 522 this->emitTransforms(args.fPB, gpArgs->fPositionVar, gp.inPosition()->fName,
args.fTransformsIn, |
| 498 args.fTransformsOut); | 523 args.fTransformsOut); |
| 499 | 524 |
| 500 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); | 525 GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
| 501 | 526 |
| 502 GrGLShaderVar edgeAlpha("edgeAlpha", kFloat_GrSLType, 0, kHigh_GrSLPrecision
); | 527 GrGLShaderVar edgeAlpha("edgeAlpha", kFloat_GrSLType, 0, kHigh_GrSLPrecision
); |
| 503 GrGLShaderVar dklmdx("dklmdx", kVec3f_GrSLType, 0, kHigh_GrSLPrecision); | 528 GrGLShaderVar dklmdx("dklmdx", kVec3f_GrSLType, 0, kHigh_GrSLPrecision); |
| 504 GrGLShaderVar dklmdy("dklmdy", kVec3f_GrSLType, 0, kHigh_GrSLPrecision); | 529 GrGLShaderVar dklmdy("dklmdy", kVec3f_GrSLType, 0, kHigh_GrSLPrecision); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 GrGeometryProcessor* gp; | 658 GrGeometryProcessor* gp; |
| 634 do { | 659 do { |
| 635 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 660 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 636 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); | 661 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); |
| 637 gp = GrCubicEffect::Create(GrRandomColor(random), | 662 gp = GrCubicEffect::Create(GrRandomColor(random), |
| 638 GrTest::TestMatrix(random), edgeType, caps); | 663 GrTest::TestMatrix(random), edgeType, caps); |
| 639 } while (NULL == gp); | 664 } while (NULL == gp); |
| 640 return gp; | 665 return gp; |
| 641 } | 666 } |
| 642 | 667 |
| OLD | NEW |