OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef GrProcOptInfo_DEFINED |
| 9 #define GrProcOptInfo_DEFINED |
| 10 |
| 11 #include "GrColor.h" |
| 12 #include "GrInvariantOutput.h" |
| 13 |
| 14 class GrFragmentStage; |
| 15 class GrGeometryProcessor; |
| 16 |
| 17 class GrProcOptInfo { |
| 18 public: |
| 19 GrProcOptInfo() |
| 20 : fInout(0, static_cast<GrColorComponentFlags>(0), false), fFirstEffectS
tageIndex(0), |
| 21 fInputColorIsUsed(true), fInputColor(0), fRemoveVertexAttrib(false), f
ReadsDst(false) {} |
| 22 |
| 23 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s
tartColor, |
| 24 GrColorComponentFlags flags, bool areCoverageStag
es, |
| 25 const GrGeometryProcessor* gp = NULL); |
| 26 |
| 27 bool isSolidWhite() const { return fInout.isSolidWhite(); } |
| 28 bool isOpaque() const { return fInout.isOpaque(); } |
| 29 |
| 30 GrColor color() const { return fInout.color(); } |
| 31 uint8_t validFlags() const { return fInout.validFlags(); } |
| 32 |
| 33 int firstEffectiveStageIndex() const { return fFirstEffectStageIndex; } |
| 34 bool inputColorIsUsed() const { return fInputColorIsUsed; } |
| 35 GrColor inputColorToEffectiveStage() const { return fInputColor; } |
| 36 bool removeVertexAttrib() const { return fRemoveVertexAttrib; } |
| 37 bool readsDst() const { return fReadsDst; } |
| 38 |
| 39 private: |
| 40 GrInvariantOutput fInout; |
| 41 int fFirstEffectStageIndex; |
| 42 bool fInputColorIsUsed; |
| 43 GrColor fInputColor; |
| 44 bool fRemoveVertexAttrib; |
| 45 bool fReadsDst; |
| 46 }; |
| 47 |
| 48 #endif |
OLD | NEW |