OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrGeometryProcessor.h" | 8 #include "GrGeometryProcessor.h" |
9 | 9 |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 typedef SkSTArray<8, SeparableVaryingInfo, true> SeparableVaryingInfoArray; | 496 typedef SkSTArray<8, SeparableVaryingInfo, true> SeparableVaryingInfoArray; |
497 | 497 |
498 SeparableVaryingInfoArray fSeparableVaryingInfos; | 498 SeparableVaryingInfoArray fSeparableVaryingInfos; |
499 | 499 |
500 typedef GrGLPathProcessor INHERITED; | 500 typedef GrGLPathProcessor INHERITED; |
501 }; | 501 }; |
502 | 502 |
503 GrPathProcessor::GrPathProcessor(GrColor color, | 503 GrPathProcessor::GrPathProcessor(GrColor color, |
504 const SkMatrix& viewMatrix, | 504 const SkMatrix& viewMatrix, |
505 const SkMatrix& localMatrix) | 505 const SkMatrix& localMatrix) |
506 : INHERITED(viewMatrix, localMatrix) | 506 : INHERITED(viewMatrix, localMatrix, true) |
507 , fColor(color) { | 507 , fColor(color) { |
508 this->initClassID<GrPathProcessor>(); | 508 this->initClassID<GrPathProcessor>(); |
509 } | 509 } |
510 | 510 |
511 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const
{ | 511 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const
{ |
512 out->setKnownFourComponents(fColor); | 512 out->setKnownFourComponents(fColor); |
513 } | 513 } |
514 | 514 |
515 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
st { | 515 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con
st { |
516 out->setKnownSingleComponent(0xff); | 516 out->setKnownSingleComponent(0xff); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 const GrGLCaps& caps)
const { | 562 const GrGLCaps& caps)
const { |
563 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport); | 563 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport); |
564 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) { | 564 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) { |
565 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt, | 565 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt, |
566 caps.maxFixedFunctionTexture
Coords())); | 566 caps.maxFixedFunctionTexture
Coords())); |
567 } else { | 567 } else { |
568 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt)); | 568 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt)); |
569 } | 569 } |
570 } | 570 } |
571 | 571 |
OLD | NEW |