Chromium Code Reviews| 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), | |
|
bsalomon
2014/11/12 22:09:39
can you put each var on its own line? This is kind
egdaniel
2014/11/13 14:58:25
Done.
| |
| 21 fInputColorIsUsed(true), fInputColor(0), fRemoveVertexAttrib(false), f ReadsDst(false) {} | |
| 22 | |
| 23 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s tartColor, | |
|
bsalomon
2014/11/12 22:09:39
Can we just call it calc()? Or do we expect variat
egdaniel
2014/11/13 14:58:25
In the future we plan to also have a version calcW
| |
| 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; } | |
|
bsalomon
2014/11/12 22:09:40
from here down, these could use some comments. e.g
egdaniel
2014/11/13 14:58:25
Done.
| |
| 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; | |
|
bsalomon
2014/11/12 22:09:40
fInOut ? Usually cap each word.
egdaniel
2014/11/13 14:58:25
Done.
| |
| 41 int fFirstEffectStageIndex; | |
| 42 bool fInputColorIsUsed; | |
| 43 GrColor fInputColor; | |
| 44 bool fRemoveVertexAttrib; | |
| 45 bool fReadsDst; | |
| 46 }; | |
| 47 | |
| 48 #endif | |
| OLD | NEW |