Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: src/gpu/GrProcOptInfo.h

Issue 719203002: Add GrProcOptInfo class to track various output information for color and coverage stages. (Closed) Base URL: https://skia.googlesource.com/skia.git@moveIO
Patch Set: Delete old code Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698