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

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: Clean up 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
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),
21 fInputColorIsUsed(true), fInputColor(0), fRemoveVertexAttrib(false), f ReadsDst(false) {}
22
23 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s tartColor,
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; }
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;
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') | src/gpu/GrProcessor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698