From 57720c384af81327d327ef8b88078f11a750fd05 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 21 Oct 2009 16:27:21 -0700 Subject: fix [2211532] improves sholes graphics performance Instead of using glTex{Sub}Image2D() to refresh the textures, we're using an EGLImageKHR object backed up by a gralloc buffer. The data is updated using memcpy(). This is faster than glTex{Sub}Image2D() because the texture is not swizzled. It also uses less memory because EGLImageKHW is not limited to power-of-two dimensions. --- libs/surfaceflinger/Layer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/surfaceflinger/Layer.h') diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h index 702c51a55c..57b3dfa41e 100644 --- a/libs/surfaceflinger/Layer.h +++ b/libs/surfaceflinger/Layer.h @@ -85,6 +85,8 @@ private: } void reloadTexture(const Region& dirty); + status_t initializeEglImageLocked( + const sp& buffer, Texture* texture); uint32_t getEffectiveUsage(uint32_t usage) const; @@ -118,6 +120,7 @@ private: // protected by mLock sp mBuffers[NUM_BUFFERS]; Texture mTextures[NUM_BUFFERS]; + sp mHybridBuffer; uint32_t mWidth; uint32_t mHeight; -- cgit v1.2.3-59-g8ed1b