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

Unified Diff: src/gpu/GrProgramDesc.h

Issue 755363002: remove proc key (Closed) Base URL: https://skia.googlesource.com/skia.git@fixkey
Patch Set: address nit Created 6 years, 1 month 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/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProgramDesc.h
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index cc8a38aa2d54d38745273cbbee5019244e9f427d..788842d7bec41a0ce211a5692fdab48957d6492f 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 {
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/effects/GrBicubicEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698