diff options
author | joshualitt <joshualitt@chromium.org> | 2014-11-25 14:52:21 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-25 14:52:21 -0800 |
commit | 267ce482b54f46097584e0f9350ec74aa6a2cd44 (patch) | |
tree | f6e1b86eb0f3a37a81981c774ee8e37cc7b7b514 /src/gpu/GrProgramDesc.h | |
parent | 7e225bdb1f00ae4aed524ff8d0a61df3d3abb109 (diff) |
remove proc key
BUG=skia:
Review URL: https://codereview.chromium.org/755363002
Diffstat (limited to 'src/gpu/GrProgramDesc.h')
-rw-r--r-- | src/gpu/GrProgramDesc.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h index cc8a38aa2d..788842d7be 100644 --- a/src/gpu/GrProgramDesc.h +++ b/src/gpu/GrProgramDesc.h @@ -139,45 +139,6 @@ public: // This should really only be used internally, base classes should return their own headers const KeyHeader& header() const { return *this->atOffset<KeyHeader, kHeaderOffset>(); } - /** Used to provide effects' keys to their emitCode() function. */ - class ProcKeyProvider { - public: - enum ProcessorType { - kGeometry_ProcessorType, - kFragment_ProcessorType, - }; - - ProcKeyProvider(const GrProgramDesc* desc, ProcessorType type, int effectOffset) - : fDesc(desc), fBaseIndex(0), fEffectOffset(effectOffset) { - switch (type) { - case kGeometry_ProcessorType: - // there can be only one - fBaseIndex = 0; - break; - case kFragment_ProcessorType: - fBaseIndex = desc->hasGeometryProcessor() ? 1 : 0; - break; - } - } - - GrProcessorKey get(int index) const { - const uint16_t* offsetsAndLengths = reinterpret_cast<const uint16_t*>( - fDesc->fKey.begin() + fEffectOffset); - // We store two uint16_ts per effect, one for the offset to the effect's key and one for - // its length. Here we just need the offset. - uint16_t offset = offsetsAndLengths[2 * (fBaseIndex + index) + 0]; - 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 GrProcessorKey(reinterpret_cast<const uint32_t*>(fDesc->fKey.begin() + offset), - length / sizeof(uint32_t)); - } - private: - const GrProgramDesc* fDesc; - int fBaseIndex; - int fEffectOffset; - }; - // A struct to communicate descriptor information to the program descriptor builder struct DescInfo { int positionAttributeIndex() const { |