diff options
Diffstat (limited to 'libs/hwui/ShadowTessellator.cpp')
| -rw-r--r-- | libs/hwui/ShadowTessellator.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp index 93d4b31..ca7f48d 100644 --- a/libs/hwui/ShadowTessellator.cpp +++ b/libs/hwui/ShadowTessellator.cpp @@ -113,33 +113,6 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque, #endif } -void ShadowTessellator::generateShadowIndices(uint16_t* shadowIndices) { - int currentIndex = 0; - const int rays = SHADOW_RAY_COUNT; - // For the penumbra area. - for (int layer = 0; layer < 2; layer ++) { - int baseIndex = layer * rays; - for (int i = 0; i < rays; i++) { - shadowIndices[currentIndex++] = i + baseIndex; - shadowIndices[currentIndex++] = rays + i + baseIndex; - } - // To close the loop, back to the ray 0. - shadowIndices[currentIndex++] = 0 + baseIndex; - // Note this is the same as the first index of next layer loop. - shadowIndices[currentIndex++] = rays + baseIndex; - } - -#if DEBUG_SHADOW - if (currentIndex != MAX_SHADOW_INDEX_COUNT) { - ALOGW("vertex index count is wrong. current %d, expected %d", - currentIndex, MAX_SHADOW_INDEX_COUNT); - } - for (int i = 0; i < MAX_SHADOW_INDEX_COUNT; i++) { - ALOGD("vertex index is (%d, %d)", i, shadowIndices[i]); - } -#endif -} - /** * Calculate the centroid of a 2d polygon. * @@ -193,7 +166,7 @@ Vector2 ShadowTessellator::calculateNormal(const Vector2& p1, const Vector2& p2) * @param len the number of points of the polygon */ bool ShadowTessellator::isClockwise(const Vector2* polygon, int len) { - if (len < 2 || polygon == NULL) { + if (len < 2 || polygon == nullptr) { return true; } double sum = 0; |
