Calculate and show Ambient shadow.
Basically we compute the shadow as a strip of triangles, whose alpha value
is the strength of the shadow.
We use the normal to extend the geometry.
And we use static function and try to avoid new/malloc in the computation.
Change-Id: I382286f1cad351bd5ff983f76f446c075819dcaf
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index f8f2284..963965d 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -208,13 +208,13 @@
* Binds an attrib to the specified float vertex pointer.
* Assumes a stride of gMeshStride and a size of 2.
*/
- void bindPositionVertexPointer(bool force, GLvoid* vertices, GLsizei stride = gMeshStride);
+ void bindPositionVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
/**
* Binds an attrib to the specified float vertex pointer.
* Assumes a stride of gMeshStride and a size of 2.
*/
- void bindTexCoordsVertexPointer(bool force, GLvoid* vertices, GLsizei stride = gMeshStride);
+ void bindTexCoordsVertexPointer(bool force, const GLvoid* vertices, GLsizei stride = gMeshStride);
/**
* Resets the vertex pointers.
@@ -379,9 +379,9 @@
GLuint mCurrentBuffer;
GLuint mCurrentIndicesBuffer;
GLuint mCurrentPixelBuffer;
- void* mCurrentPositionPointer;
+ const void* mCurrentPositionPointer;
GLsizei mCurrentPositionStride;
- void* mCurrentTexCoordsPointer;
+ const void* mCurrentTexCoordsPointer;
GLsizei mCurrentTexCoordsStride;
bool mTexCoordsArrayEnabled;