| 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),
|
| + fInputColorIsUsed(true), fInputColor(0), fRemoveVertexAttrib(false), fReadsDst(false) {}
|
| +
|
| + void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor startColor,
|
| + 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; }
|
| + bool inputColorIsUsed() const { return fInputColorIsUsed; }
|
| + GrColor inputColorToEffectiveStage() const { return fInputColor; }
|
| + bool removeVertexAttrib() const { return fRemoveVertexAttrib; }
|
| + bool readsDst() const { return fReadsDst; }
|
| +
|
| +private:
|
| + GrInvariantOutput fInout;
|
| + int fFirstEffectStageIndex;
|
| + bool fInputColorIsUsed;
|
| + GrColor fInputColor;
|
| + bool fRemoveVertexAttrib;
|
| + bool fReadsDst;
|
| +};
|
| +
|
| +#endif
|
|
|