diff options
Diffstat (limited to 'libs/hwui/SpotShadow.cpp')
| -rw-r--r-- | libs/hwui/SpotShadow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp index 3046fd5..b3b06d6 100644 --- a/libs/hwui/SpotShadow.cpp +++ b/libs/hwui/SpotShadow.cpp @@ -52,6 +52,7 @@ #include "ShadowTessellator.h" #include "SpotShadow.h" #include "Vertex.h" +#include "VertexBuffer.h" #include "utils/MathUtils.h" // TODO: After we settle down the new algorithm, we can remove the old one and @@ -331,7 +332,7 @@ bool SpotShadow::testPointInsidePolygon(const Vector2 testPoint, * @param len the number of points of the polygon */ void SpotShadow::makeClockwise(Vector2* polygon, int len) { - if (polygon == 0 || len == 0) { + if (polygon == nullptr || len == 0) { return; } if (!ShadowTessellator::isClockwise(polygon, len)) { @@ -1030,7 +1031,7 @@ void SpotShadow::generateTriangleStrip(bool isCasterOpaque, float shadowStrength ShadowTessellator::checkOverflow(vertexBufferIndex, totalVertexCount, "Spot Vertex Buffer"); ShadowTessellator::checkOverflow(indexBufferIndex, totalIndexCount, "Spot Index Buffer"); - shadowTriangleStrip.setMode(VertexBuffer::kIndices); + shadowTriangleStrip.setMeshFeatureFlags(VertexBuffer::kAlpha | VertexBuffer::kIndices); shadowTriangleStrip.computeBounds<AlphaVertex>(); } |
