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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 746423007: Draft change to start pulling uniform color into GP (Closed) Base URL: https://skia.googlesource.com/skia.git@no_factories
Patch Set: missed some places to update uniform cache Created 6 years 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
Index: src/gpu/GrOptDrawState.h
diff --git a/src/gpu/GrOptDrawState.h b/src/gpu/GrOptDrawState.h
index 876ff52137578fc47a37531d3431629730065161..0c79fc472fd5e84e29ac5432fc9ab84f75ea0d5a 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -35,6 +35,10 @@ public:
const GrDrawTargetCaps&, const ScissorState&,
const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType);
+ /*
+ * the Equality operator may update GrOptDrawState's GrBatchTracker object to subsume that's
+ * GrBatchTracker into this's GrBatchTracker.
+ */
bool operator== (const GrOptDrawState& that) const;
bool operator!= (const GrOptDrawState& that) const { return !(*this == that); }
@@ -49,18 +53,6 @@ public:
/// @}
///////////////////////////////////////////////////////////////////////////
- /// @name Coverage
- ////
-
- uint8_t getCoverage() const { return fCoverage; }
-
- GrColor getCoverageColor() const {
- return GrColorPackRGBA(fCoverage, fCoverage, fCoverage, fCoverage);
- }
-
- /// @}
-
- ///////////////////////////////////////////////////////////////////////////
/// @name Effect Stages
/// Each stage hosts a GrProcessor. The effect produces an output color or coverage in the
/// fragment shader. Its inputs are the output from the previous stage as well as some variables
@@ -85,8 +77,10 @@ public:
return this->numFragmentStages() + (this->hasGeometryProcessor() ? 1 : 0) + 1;
}
+ // TODO remove the GP specific calls when the PathProc can provide the same interface
bool hasGeometryProcessor() const { return SkToBool(fGeometryProcessor.get()); }
const GrGeometryProcessor* getGeometryProcessor() const { return fGeometryProcessor.get(); }
+ const GrPrimitiveProcessor* getPrimitiveProcessor() const { return fPrimitiveProcessor.get(); }
const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get(); }
@@ -213,13 +207,12 @@ private:
GrColor fColor;
SkMatrix fViewMatrix;
GrStencilSettings fStencilSettings;
- uint8_t fCoverage;
GrDrawState::DrawFace fDrawFace;
GrDeviceCoordTexture fDstCopy;
uint32_t fFlags;
ProgramGeometryProcessor fGeometryProcessor;
ProgramPrimitiveProcessor fPrimitiveProcessor;
- GrBatchTracker fBatchTracker;
+ mutable GrBatchTracker fBatchTracker;
ProgramXferProcessor fXferProcessor;
FragmentStageArray fFragmentStages;
GrGpu::DrawType fDrawType;

Powered by Google App Engine
This is Rietveld 408576698