diff options
author | 2015-08-26 06:48:27 -0700 | |
---|---|---|
committer | 2015-08-26 06:48:27 -0700 | |
commit | 4bf69f7bbc073c1dc257f93f8c5b2a530123cb3c (patch) | |
tree | d6c670d7230600b174d6f08799a7ad1f4b9c002e /src/gpu/GrPipeline.h | |
parent | 8cce8f139e4b91783722f11ccb6ac9bbdf8327e7 (diff) |
Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
Reason for revert:
Causes bot failures:
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223
Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7
TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1306803003
Diffstat (limited to 'src/gpu/GrPipeline.h')
-rw-r--r-- | src/gpu/GrPipeline.h | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index db1415524d..ea2ea855dc 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -9,10 +9,9 @@ #define GrPipeline_DEFINED #include "GrColor.h" -#include "GrFragmentProcessor.h" #include "GrGpu.h" #include "GrNonAtomicRef.h" -#include "GrPendingProgramElement.h" +#include "GrPendingFragmentStage.h" #include "GrPrimitiveProcessor.h" #include "GrProgramDesc.h" #include "GrStencil.h" @@ -85,26 +84,22 @@ public: /// @name GrFragmentProcessors - int numColorFragmentProcessors() const { return fNumColorProcessors; } - int numCoverageFragmentProcessors() const { - return fFragmentProcessors.count() - fNumColorProcessors; - } - int numFragmentProcessors() const { return fFragmentProcessors.count(); } + int numColorFragmentStages() const { return fNumColorStages; } + int numCoverageFragmentStages() const { return fFragmentStages.count() - fNumColorStages; } + int numFragmentStages() const { return fFragmentStages.count(); } const GrXferProcessor* getXferProcessor() const { return fXferProcessor.get(); } - const GrFragmentProcessor& getColorFragmentProcessor(int idx) const { - SkASSERT(idx < this->numColorFragmentProcessors()); - return *fFragmentProcessors[idx].get(); + const GrPendingFragmentStage& getColorStage(int idx) const { + SkASSERT(idx < this->numColorFragmentStages()); + return fFragmentStages[idx]; } - - const GrFragmentProcessor& getCoverageFragmentProcessor(int idx) const { - SkASSERT(idx < this->numCoverageFragmentProcessors()); - return *fFragmentProcessors[fNumColorProcessors + idx].get(); + const GrPendingFragmentStage& getCoverageStage(int idx) const { + SkASSERT(idx < this->numCoverageFragmentStages()); + return fFragmentStages[fNumColorStages + idx]; } - - const GrFragmentProcessor& getFragmentProcessor(int idx) const { - return *fFragmentProcessors[idx].get(); + const GrPendingFragmentStage& getFragmentStage(int idx) const { + return fFragmentStages[idx]; } /// @} @@ -154,8 +149,8 @@ private: GrXferProcessor::OptFlags, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - int* firstColorProcessorIdx, - int* firstCoverageProcessorIdx); + int* firstColorStageIdx, + int* firstCoverageStageIdx); /** * Calculates the primary and secondary output types of the shader. For certain output types @@ -172,8 +167,7 @@ private: }; typedef GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> RenderTarget; - typedef GrPendingProgramElement<const GrFragmentProcessor> PendingFragmentProcessor; - typedef SkAutoSTArray<8, PendingFragmentProcessor> FragmentProcessorArray; + typedef SkSTArray<8, GrPendingFragmentStage> FragmentStageArray; typedef GrPendingProgramElement<const GrXferProcessor> ProgramXferProcessor; RenderTarget fRenderTarget; GrScissorState fScissorState; @@ -181,11 +175,11 @@ private: GrPipelineBuilder::DrawFace fDrawFace; uint32_t fFlags; ProgramXferProcessor fXferProcessor; - FragmentProcessorArray fFragmentProcessors; + FragmentStageArray fFragmentStages; bool fReadsFragPosition; - // This value is also the index in fFragmentProcessors where coverage processors begin. - int fNumColorProcessors; + // This function is equivalent to the offset into fFragmentStages where coverage stages begin. + int fNumColorStages; SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms; GrProgramDesc fDesc; |