Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2dcd6fd authored by ztenghui's avatar ztenghui
Browse files

A better looking and faster spot shadow.

1. This improve the looking, the star shape (spike) on long action bar is gone.
Shadow is more smooth now.

2. The performance is better, too. For averaging around rect, round rect and
circle, the spot shadow itself is 3 times faster. On N7 v1, it could be less than
0.1 ms.

b/14976551
b/16712006

Change-Id: I61ed546ee56e7c8dbe504dfcaef12d084904b4b8
parent db41880d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -326,9 +326,9 @@ void AmbientShadow::createAmbientShadow(bool isCasterOpaque,
    shadowVertexBuffer.updateVertexCount(vertexBufferIndex);
    shadowVertexBuffer.updateIndexCount(indexBufferIndex);

    ShadowTessellator::checkOverflow(vertexBufferIndex, totalVertexCount, "Vertex Buffer");
    ShadowTessellator::checkOverflow(indexBufferIndex, totalIndexCount, "Index Buffer");
    ShadowTessellator::checkOverflow(umbraIndex, totalUmbraCount, "Umbra Buffer");
    ShadowTessellator::checkOverflow(vertexBufferIndex, totalVertexCount, "Ambient Vertex Buffer");
    ShadowTessellator::checkOverflow(indexBufferIndex, totalIndexCount, "Ambient Index Buffer");
    ShadowTessellator::checkOverflow(umbraIndex, totalUmbraCount, "Ambient Umbra Buffer");

#if DEBUG_SHADOW
    for (int i = 0; i < vertexBufferIndex; i++) {