summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Caches.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Caches.h')
-rw-r--r--libs/hwui/Caches.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index 282aee9..2e2ee15 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -62,7 +62,7 @@ namespace uirenderer {
static const uint32_t gMaxNumberOfQuads = 2048;
// Generates simple and textured vertices
-#define FV(x, y, u, v) { { x, y }, { u, v } }
+#define FV(x, y, u, v) { x, y, u, v }
// This array is never used directly but used as a memcpy source in the
// OpenGLRenderer constructor
@@ -102,7 +102,7 @@ struct CacheLogger {
// Caches
///////////////////////////////////////////////////////////////////////////////
-class DisplayList;
+class RenderNode;
class ANDROID_API Caches: public Singleton<Caches> {
Caches();
@@ -166,11 +166,6 @@ public:
*/
void deleteLayerDeferred(Layer* layer);
- /*
- * Can be used to delete a display list from a non EGL thread.
- */
- void deleteDisplayListDeferred(DisplayList* layer);
-
/**
* Binds the VBO used to render simple textured quads.
*/
@@ -190,8 +185,8 @@ public:
* Binds a global indices buffer that can draw up to
* gMaxNumberOfQuads quads.
*/
- bool bindIndicesBuffer();
- bool bindIndicesBuffer(const GLuint buffer);
+ bool bindQuadIndicesBuffer();
+ bool bindShadowIndicesBuffer();
bool unbindIndicesBuffer();
/**
@@ -208,13 +203,13 @@ public:
* 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.
@@ -353,6 +348,17 @@ public:
PFNGLLABELOBJECTEXTPROC setLabel;
PFNGLGETOBJECTLABELEXTPROC getLabel;
+ // TEMPORARY properties
+ void initTempProperties();
+ void setTempProperty(const char* name, const char* value);
+
+ float propertyLightDiameter;
+ float propertyLightPosY;
+ float propertyLightPosZ;
+ float propertyAmbientRatio;
+ int propertyAmbientShadowStrength;
+ int propertySpotShadowStrength;
+
private:
enum OverdrawColorSet {
kColorSet_Default = 0,
@@ -364,6 +370,8 @@ private:
void initConstraints();
void initStaticProperties();
+ bool bindIndicesBufferInternal(const GLuint buffer);
+
static void eventMarkNull(GLsizei length, const GLchar* marker) { }
static void startMarkNull(GLsizei length, const GLchar* marker) { }
static void endMarkNull() { }
@@ -379,9 +387,9 @@ private:
GLuint mCurrentBuffer;
GLuint mCurrentIndicesBuffer;
GLuint mCurrentPixelBuffer;
- void* mCurrentPositionPointer;
+ const void* mCurrentPositionPointer;
GLsizei mCurrentPositionStride;
- void* mCurrentTexCoordsPointer;
+ const void* mCurrentTexCoordsPointer;
GLsizei mCurrentTexCoordsStride;
bool mTexCoordsArrayEnabled;
@@ -400,10 +408,10 @@ private:
// Global index buffer
GLuint mMeshIndices;
+ GLuint mShadowStripsIndices;
mutable Mutex mGarbageLock;
Vector<Layer*> mLayerGarbage;
- Vector<DisplayList*> mDisplayListGarbage;
DebugLevel mDebugLevel;
bool mInitialized;