summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/Layer.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-10-21 16:27:21 -0700
committerMathias Agopian <mathias@google.com>2009-10-23 15:37:28 -0700
commit382e17d46fc54396a303593f2db3abe1fb911411 (patch)
tree718e2186139053ae9b3cf5dc07c7cbffb6b7cb5d /libs/surfaceflinger/Layer.h
parentdd28d56368441537ec5eb42150516416fdbf10ad (diff)
downloadframeworks_base-382e17d46fc54396a303593f2db3abe1fb911411.zip
frameworks_base-382e17d46fc54396a303593f2db3abe1fb911411.tar.gz
frameworks_base-382e17d46fc54396a303593f2db3abe1fb911411.tar.bz2
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.
Diffstat (limited to 'libs/surfaceflinger/Layer.h')
-rw-r--r--libs/surfaceflinger/Layer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
index 702c51a..57b3dfa 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<GraphicBuffer>& buffer, Texture* texture);
uint32_t getEffectiveUsage(uint32_t usage) const;
@@ -118,6 +120,7 @@ private:
// protected by mLock
sp<GraphicBuffer> mBuffers[NUM_BUFFERS];
Texture mTextures[NUM_BUFFERS];
+ sp<GraphicBuffer> mHybridBuffer;
uint32_t mWidth;
uint32_t mHeight;