Chromium Code Reviews| Index: src/gpu/gl/GrGLProgramDesc.h |
| diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h |
| index 8cee707dbcbef4082ff557bb0ba262945c875be5..1abc3879e23315add9815e94c15a98a02c3af9eb 100644 |
| --- a/src/gpu/gl/GrGLProgramDesc.h |
| +++ b/src/gpu/gl/GrGLProgramDesc.h |
| @@ -8,7 +8,7 @@ |
| #ifndef GrGLProgramDesc_DEFINED |
| #define GrGLProgramDesc_DEFINED |
| -#include "GrGLEffect.h" |
| +#include "GrGLProcessor.h" |
| #include "GrDrawState.h" |
| #include "GrGpu.h" |
| @@ -48,8 +48,8 @@ public: |
| const GrGpuGL* gpu, |
| const GrRenderTarget* dummyDstRenderTarget, |
| const GrTexture* dummyDstCopyTexture, |
| - const GrEffectStage* geometryProcessor, |
| - const GrEffectStage* stages[], |
| + const GrGeometryStage* geometryProcessor, |
| + const GrFragmentStage* stages[], |
| int numColorStages, |
| int numCoverageStages, |
| int currAttribIndex); |
| @@ -60,16 +60,16 @@ public: |
| * referenced by the generated descriptor. Coverage stages from the drawState may be treated as |
| * color stages in the output. |
| */ |
| - static bool Build(const GrOptDrawState&, |
| + static bool Build(const GrOptDrawState& optState, |
|
bsalomon
2014/09/22 15:35:24
IMO param names that just repeat the type name are
|
| GrGpu::DrawType drawType, |
| GrBlendCoeff srcCoeff, |
| GrBlendCoeff dstCoeff, |
| const GrGpuGL* gpu, |
| const GrDeviceCoordTexture* dstCopy, |
| - const GrEffectStage** outGeometryProcessor, |
| - SkTArray<const GrEffectStage*, true>* outColorStages, |
| - SkTArray<const GrEffectStage*, true>* outCoverageStages, |
| - GrGLProgramDesc* outDesc); |
| + const GrGeometryStage** geometryProcessor, |
| + SkTArray<const GrFragmentStage*, true>* colorStages, |
| + SkTArray<const GrFragmentStage*, true>* coverageStages, |
| + GrGLProgramDesc* desc); |
| bool hasGeometryProcessor() const { |
| return SkToBool(this->getHeader().fHasGeometryProcessor); |
| @@ -201,10 +201,17 @@ private: |
| KeyHeader* header() { return this->atOffset<KeyHeader, kHeaderOffset>(); } |
| // Shared code between setRandom() and Build(). |
| - static bool GetEffectKey(const GrEffectStage& stage, const GrGLCaps& caps, |
| - bool useExplicitLocalCoords, GrEffectKeyBuilder* b, |
| - uint16_t* effectKeySize); |
| - |
| + static bool GetProcessorKey(const GrProcessorStage& stage, |
| + const GrGLCaps& caps, |
| + bool useExplicitLocalCoords, |
| + GrProcessorKeyBuilder* b, |
| + uint16_t* effectKeySize); |
| + |
| + static bool GetGeometryProcessorKey(const GrGeometryStage& stage, |
| + const GrGLCaps& caps, |
| + bool useExplicitLocalCoords, |
| + GrProcessorKeyBuilder* b, |
| + uint16_t* effectKeySize); |
| void finalize(); |
| const KeyHeader& getHeader() const { return *this->atOffset<KeyHeader, kHeaderOffset>(); } |
| @@ -233,7 +240,7 @@ private: |
| } |
| } |
| - GrEffectKey get(int index) const { |
| + GrProcessorKey get(int index) const { |
| const uint16_t* offsetsAndLengths = reinterpret_cast<const uint16_t*>( |
| fDesc->fKey.begin() + kEffectKeyOffsetsAndLengthOffset); |
| // We store two uint16_ts per effect, one for the offset to the effect's key and one for |
| @@ -242,7 +249,7 @@ private: |
| uint16_t length = offsetsAndLengths[2 * (fBaseIndex + index) + 1]; |
| // Currently effects must add to the key in units of uint32_t. |
| SkASSERT(0 == (length % sizeof(uint32_t))); |
| - return GrEffectKey(reinterpret_cast<const uint32_t*>(fDesc->fKey.begin() + offset), |
| + return GrProcessorKey(reinterpret_cast<const uint32_t*>(fDesc->fKey.begin() + offset), |
| length / sizeof(uint32_t)); |
| } |
| private: |
| @@ -261,7 +268,7 @@ private: |
| // GrGLProgram and GrGLShaderBuilder read the private fields to generate code. TODO: Split out |
| // part of GrGLShaderBuilder that is used by effects so that this header doesn't need to be |
| - // visible to GrGLEffects. Then make public accessors as necessary and remove friends. |
| + // visible to GrGLProcessors. Then make public accessors as necessary and remove friends. |
| friend class GrGLProgram; |
| friend class GrGLProgramBuilder; |
| friend class GrGLFullProgramBuilder; |