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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 560443004: Revert of Attach GrOptDrawState into shader building pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt2
Patch Set: Created 6 years, 3 months 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/GrDrawState.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.h
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h
index 457f0354239fc8eb96d4cbc2196f103ca4dd9a88..a4edc01c8a465cdf3a510dc10af7b2811fddb8c7 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -8,8 +8,9 @@
#ifndef GrOptDrawState_DEFINED
#define GrOptDrawState_DEFINED
-#include "GrDrawState.h"
#include "GrRODrawState.h"
+
+class GrDrawState;
/**
* Subclass of GrRODrawState that holds an optimized version of a GrDrawState. Like it's parent
@@ -18,19 +19,15 @@
*/
class GrOptDrawState : public GrRODrawState {
public:
- bool operator== (const GrOptDrawState& that) const;
-
- bool inputColorIsUsed() const { return fInputColorIsUsed; }
- bool inputCoverageIsUsed() const { return fInputCoverageIsUsed; }
-
-private:
/**
* Constructs and optimized drawState out of a GrRODrawState.
*/
- GrOptDrawState(const GrDrawState& drawState, BlendOptFlags blendOptFlags,
- GrBlendCoeff optSrcCoeff, GrBlendCoeff optDstCoeff);
+ explicit GrOptDrawState(const GrDrawState& drawState);
- /**
+ bool operator== (const GrOptDrawState& that) const;
+
+private:
+ /*
* Loops through all the color stage effects to check if the stage will ignore color input or
* always output a constant color. In the ignore color input case we can ignore all previous
* stages. In the constant color case, we can ignore all previous stages and
@@ -40,7 +37,7 @@
*/
void copyEffectiveColorStages(const GrDrawState& ds);
- /**
+ /*
* Loops through all the coverage stage effects to check if the stage will ignore color input.
* If a coverage stage will ignore input, then we can ignore all coverage stages before it. We
* loop to determine the first effective coverage stage, and then copy all of our effective
@@ -48,18 +45,14 @@
*/
void copyEffectiveCoverageStages(const GrDrawState& ds);
- /**
+ /*
* This function takes in a flag and removes the corresponding fixed function vertex attributes.
* The flags are in the same order as GrVertexAttribBinding array. If bit i of removeVAFlags is
* set, then vertex attributes with binding (GrVertexAttribute)i will be removed.
*/
void removeFixedFunctionVertexAttribs(uint8_t removeVAFlags);
- /**
- * Alter the OptDrawState (adjusting stages, vertex attribs, flags, etc.) based on the
- * BlendOptFlags.
- */
- void adjustFromBlendOpts();
+ void removeColorVertexAttrib();
// These flags are needed to protect the code from creating an unused uniform color/coverage
// which will cause shader compiler errors.
@@ -68,9 +61,6 @@
SkAutoSTArray<4, GrVertexAttrib> fOptVA;
- BlendOptFlags fBlendOptFlags;
-
- friend GrOptDrawState* GrDrawState::createOptState() const;
typedef GrRODrawState INHERITED;
};
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698