diff options
Diffstat (limited to 'src/gpu/GrPrimitiveProcessor.cpp')
-rw-r--r-- | src/gpu/GrPrimitiveProcessor.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/gpu/GrPrimitiveProcessor.cpp b/src/gpu/GrPrimitiveProcessor.cpp index 2aaaa0474f..b981977af3 100644 --- a/src/gpu/GrPrimitiveProcessor.cpp +++ b/src/gpu/GrPrimitiveProcessor.cpp @@ -10,23 +10,15 @@ #include "GrCoordTransform.h" /** - * The key for an individual coord transform is made up of a matrix type, a precision, and a bit - * that indicates the source of the input coords. + * The key for an individual coord transform is made up of a matrix type, and a bit that indicates + * the source of the input coords. */ enum { kMatrixTypeKeyBits = 1, - kMatrixTypeKeyMask = (1 << kMatrixTypeKeyBits) - 1, - - kPrecisionBits = 2, - kPrecisionShift = kMatrixTypeKeyBits, - - kPositionCoords_Flag = (1 << (kPrecisionShift + kPrecisionBits)), - - kTransformKeyBits = kMatrixTypeKeyBits + kPrecisionBits + 2, + kPositionCoords_Flag = 1 << kMatrixTypeKeyBits, + kTransformKeyBits = kMatrixTypeKeyBits + 1, }; -GR_STATIC_ASSERT(kHigh_GrSLPrecision < (1 << kPrecisionBits)); - /** * We specialize the vertex code for each of these matrix types. */ @@ -52,9 +44,6 @@ GrPrimitiveProcessor::getTransformKey(const SkTArray<const GrCoordTransform*, tr key |= kPositionCoords_Flag; } - GR_STATIC_ASSERT(kGrSLPrecisionCount <= (1 << kPrecisionBits)); - key |= (coordTransform->precision() << kPrecisionShift); - key <<= kTransformKeyBits * t; SkASSERT(0 == (totalKey & key)); // keys for each transform ought not to overlap |