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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« 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