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

Unified Diff: src/gpu/GrOptDrawState.h

Issue 815643005: Move program descriptor and primitive processor off of optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix Created 5 years, 11 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/GrInOrderDrawBuffer.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 00e368c66a570c00353a1253977706b3bfcfe8b2..6beeea2f874855448ba181b42313f1fa77534b8d 100644
--- a/src/gpu/GrOptDrawState.h
+++ b/src/gpu/GrOptDrawState.h
@@ -37,7 +37,7 @@ public:
* Returns true if it is possible to combine the two GrOptDrawStates and it will update 'this'
* to subsume 'that''s draw.
*/
- bool combineIfPossible(const GrOptDrawState& that);
+ bool isEqual(const GrOptDrawState& that) const;
/// @}
@@ -62,9 +62,6 @@ public:
int numCoverageStages() const { return fFragmentStages.count() - fNumColorStages; }
int numFragmentStages() const { return fFragmentStages.count(); }
- const GrPrimitiveProcessor* getPrimitiveProcessor() const { return fPrimitiveProcessor.get(); }
- const GrBatchTracker& getBatchTracker() const { return fBatchTracker; }
-
const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get(); }
const GrPendingFragmentStage& getColorStage(int idx) const {
@@ -135,10 +132,9 @@ public:
const GrDeviceCoordTexture* getDstCopy() const { return fDstCopy.texture() ? &fDstCopy : NULL; }
- // Finalize *MUST* be called before programDesc()
- void finalize(GrGpu*);
+ const GrProgramDesc::DescInfo& descInfo() const { return fDescInfo; }
- const GrProgramDesc& programDesc() const { SkASSERT(fFinalized); return fDesc; }
+ const GrGeometryProcessor::InitBT& getInitBatchTracker() const { return fInitBT; }
private:
/**
@@ -166,8 +162,6 @@ private:
typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray;
- typedef GrPendingProgramElement<const GrGeometryProcessor> ProgramGeometryProcessor;
- typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitiveProcessor;
typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
RenderTarget fRenderTarget;
GrScissorState fScissorState;
@@ -175,13 +169,11 @@ private:
GrDrawState::DrawFace fDrawFace;
GrDeviceCoordTexture fDstCopy;
uint32_t fFlags;
- ProgramPrimitiveProcessor fPrimitiveProcessor;
- GrBatchTracker fBatchTracker;
ProgramXferProcessor fXferProcessor;
FragmentStageArray fFragmentStages;
GrGpu::DrawType fDrawType;
GrProgramDesc::DescInfo fDescInfo;
- bool fFinalized;
+ GrGeometryProcessor::InitBT fInitBT;
// This function is equivalent to the offset into fFragmentStages where coverage stages begin.
int fNumColorStages;
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698