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

Unified Diff: src/gpu/GrPipeline.h

Issue 1307223004: Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix misresolve Created 5 years, 4 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/GrPendingFragmentStage.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipeline.h
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index ea2ea855dc651d9b33fe832190c4c6fc331d2414..db1415524d91c1068332d8d22500e21e5282f48f 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -9,9 +9,10 @@
#define GrPipeline_DEFINED
#include "GrColor.h"
+#include "GrFragmentProcessor.h"
#include "GrGpu.h"
#include "GrNonAtomicRef.h"
-#include "GrPendingFragmentStage.h"
+#include "GrPendingProgramElement.h"
#include "GrPrimitiveProcessor.h"
#include "GrProgramDesc.h"
#include "GrStencil.h"
@@ -84,22 +85,26 @@ public:
/// @name GrFragmentProcessors
- int numColorFragmentStages() const { return fNumColorStages; }
- int numCoverageFragmentStages() const { return fFragmentStages.count() - fNumColorStages; }
- int numFragmentStages() const { return fFragmentStages.count(); }
+ int numColorFragmentProcessors() const { return fNumColorProcessors; }
+ int numCoverageFragmentProcessors() const {
+ return fFragmentProcessors.count() - fNumColorProcessors;
+ }
+ int numFragmentProcessors() const { return fFragmentProcessors.count(); }
const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get(); }
- const GrPendingFragmentStage& getColorStage(int idx) const {
- SkASSERT(idx < this->numColorFragmentStages());
- return fFragmentStages[idx];
+ const GrFragmentProcessor& getColorFragmentProcessor(int idx) const {
+ SkASSERT(idx < this->numColorFragmentProcessors());
+ return *fFragmentProcessors[idx].get();
}
- const GrPendingFragmentStage& getCoverageStage(int idx) const {
- SkASSERT(idx < this->numCoverageFragmentStages());
- return fFragmentStages[fNumColorStages + idx];
+
+ const GrFragmentProcessor& getCoverageFragmentProcessor(int idx) const {
+ SkASSERT(idx < this->numCoverageFragmentProcessors());
+ return *fFragmentProcessors[fNumColorProcessors + idx].get();
}
- const GrPendingFragmentStage& getFragmentStage(int idx) const {
- return fFragmentStages[idx];
+
+ const GrFragmentProcessor& getFragmentProcessor(int idx) const {
+ return *fFragmentProcessors[idx].get();
}
/// @}
@@ -149,8 +154,8 @@ private:
GrXferProcessor::OptFlags,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- int* firstColorStageIdx,
- int* firstCoverageStageIdx);
+ int* firstColorProcessorIdx,
+ int* firstCoverageProcessorIdx);
/**
* Calculates the primary and secondary output types of the shader. For certain output types
@@ -167,7 +172,8 @@ private:
};
typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget;
- typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray;
+ typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentProcessor;
+ typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray;
typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor;
RenderTarget fRenderTarget;
GrScissorState fScissorState;
@@ -175,11 +181,11 @@ private:
GrPipelineBuilder::DrawFace fDrawFace;
uint32_t fFlags;
ProgramXferProcessor fXferProcessor;
- FragmentStageArray fFragmentStages;
+ FragmentProcessorArray fFragmentProcessors;
bool fReadsFragPosition;
- // This function is equivalent to the offset into fFragmentStages where coverage stages begin.
- int fNumColorStages;
+ // This value is also the index in fFragmentProcessors where coverage processors begin.
+ int fNumColorProcessors;
SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms;
GrProgramDesc fDesc;
« no previous file with comments | « src/gpu/GrPendingFragmentStage.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698