Chromium Code Reviews| Index: src/gpu/GrProcOptInfo.h |
| diff --git a/src/gpu/GrProcOptInfo.h b/src/gpu/GrProcOptInfo.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1fb940252c4a391c5b1949524d16f95ece8e5db5 |
| --- /dev/null |
| +++ b/src/gpu/GrProcOptInfo.h |
| @@ -0,0 +1,48 @@ |
| +/* |
| + * Copyright 2014 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef GrProcOptInfo_DEFINED |
| +#define GrProcOptInfo_DEFINED |
| + |
| +#include "GrColor.h" |
| +#include "GrInvariantOutput.h" |
| + |
| +class GrFragmentStage; |
| +class GrGeometryProcessor; |
| + |
| +class GrProcOptInfo { |
| +public: |
| + GrProcOptInfo() |
| + : fInout(0, static_cast<GrColorComponentFlags>(0), false), fFirstEffectStageIndex(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.
|
| + fInputColorIsUsed(true), fInputColor(0), fRemoveVertexAttrib(false), fReadsDst(false) {} |
| + |
| + void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor startColor, |
|
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
|
| + GrColorComponentFlags flags, bool areCoverageStages, |
| + const GrGeometryProcessor* gp = NULL); |
| + |
| + bool isSolidWhite() const { return fInout.isSolidWhite(); } |
| + bool isOpaque() const { return fInout.isOpaque(); } |
| + |
| + GrColor color() const { return fInout.color(); } |
| + uint8_t validFlags() const { return fInout.validFlags(); } |
| + |
| + 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.
|
| + bool inputColorIsUsed() const { return fInputColorIsUsed; } |
| + GrColor inputColorToEffectiveStage() const { return fInputColor; } |
| + bool removeVertexAttrib() const { return fRemoveVertexAttrib; } |
| + bool readsDst() const { return fReadsDst; } |
| + |
| +private: |
| + GrInvariantOutput fInout; |
|
bsalomon
2014/11/12 22:09:40
fInOut ? Usually cap each word.
egdaniel
2014/11/13 14:58:25
Done.
|
| + int fFirstEffectStageIndex; |
| + bool fInputColorIsUsed; |
| + GrColor fInputColor; |
| + bool fRemoveVertexAttrib; |
| + bool fReadsDst; |
| +}; |
| + |
| +#endif |