summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-04-22 15:49:28 -0700
committerMathias Agopian <mathias@google.com>2009-04-24 16:31:11 -0700
commit81b0aa696ac954180caec6cb8cc1bb97440e03b5 (patch)
treeaf034e81f2becc4a2d70e0d821a4cb11efc0eb2b /libs/surfaceflinger
parentef07dda442f210bc7a6b5fbdd4a0bed4e6d8ad50 (diff)
downloadframeworks_base-81b0aa696ac954180caec6cb8cc1bb97440e03b5.zip
frameworks_base-81b0aa696ac954180caec6cb8cc1bb97440e03b5.tar.gz
frameworks_base-81b0aa696ac954180caec6cb8cc1bb97440e03b5.tar.bz2
get rid of an old hack to work around a bug around glDeleteTextures() in the adreno drivers
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/Layer.cpp2
-rw-r--r--libs/surfaceflinger/LayerBase.cpp2
-rw-r--r--libs/surfaceflinger/LayerBase.h2
-rw-r--r--libs/surfaceflinger/LayerBlur.cpp3
-rw-r--r--libs/surfaceflinger/LayerBuffer.cpp2
-rw-r--r--libs/surfaceflinger/LayerOrientationAnim.cpp4
-rw-r--r--libs/surfaceflinger/LayerOrientationAnimRotate.cpp4
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp7
8 files changed, 7 insertions, 19 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 4e3f3a9..182fbb2 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -71,7 +71,7 @@ void Layer::destroy()
if (mTextures[i].name != -1U) {
// FIXME: this was originally to work-around a bug in the
// adreno driver. this should be fixed now.
- deletedTextures.add(mTextures[i].name);
+ glDeleteTextures(1, &mTextures[i].name);
mTextures[i].name = -1U;
}
if (mTextures[i].image != EGL_NO_IMAGE_KHR) {
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index 8609225..ef5a959 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -53,8 +53,6 @@ const char* const LayerBaseClient::typeID = "LayerBaseClient";
// ---------------------------------------------------------------------------
-Vector<GLuint> LayerBase::deletedTextures;
-
int32_t LayerBase::sIdentity = 0;
LayerBase::LayerBase(SurfaceFlinger* flinger, DisplayID display)
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
index 2ab6f67..c177c2a 100644
--- a/libs/surfaceflinger/LayerBase.h
+++ b/libs/surfaceflinger/LayerBase.h
@@ -72,8 +72,6 @@ public:
}
- static Vector<GLuint> deletedTextures;
-
LayerBase(SurfaceFlinger* flinger, DisplayID display);
DisplayID dpy;
diff --git a/libs/surfaceflinger/LayerBlur.cpp b/libs/surfaceflinger/LayerBlur.cpp
index 54d5c52..cac3cf1 100644
--- a/libs/surfaceflinger/LayerBlur.cpp
+++ b/libs/surfaceflinger/LayerBlur.cpp
@@ -47,8 +47,7 @@ LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display,
LayerBlur::~LayerBlur()
{
if (mTextureName != -1U) {
- //glDeleteTextures(1, &mTextureName);
- deletedTextures.add(mTextureName);
+ glDeleteTextures(1, &mTextureName);
}
}
diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp
index 97d6f97..9339b87 100644
--- a/libs/surfaceflinger/LayerBuffer.cpp
+++ b/libs/surfaceflinger/LayerBuffer.cpp
@@ -322,7 +322,7 @@ LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer,
LayerBuffer::BufferSource::~BufferSource()
{
if (mTextureName != -1U) {
- LayerBase::deletedTextures.add(mTextureName);
+ glDeleteTextures(1, &mTextureName);
}
}
diff --git a/libs/surfaceflinger/LayerOrientationAnim.cpp b/libs/surfaceflinger/LayerOrientationAnim.cpp
index 095fed8..41c42d1 100644
--- a/libs/surfaceflinger/LayerOrientationAnim.cpp
+++ b/libs/surfaceflinger/LayerOrientationAnim.cpp
@@ -73,10 +73,10 @@ LayerOrientationAnim::LayerOrientationAnim(
LayerOrientationAnim::~LayerOrientationAnim()
{
if (mTextureName != -1U) {
- LayerBase::deletedTextures.add(mTextureName);
+ glDeleteTextures(1, &mTextureName);
}
if (mTextureNameIn != -1U) {
- LayerBase::deletedTextures.add(mTextureNameIn);
+ glDeleteTextures(1, &mTextureNameIn);
}
}
diff --git a/libs/surfaceflinger/LayerOrientationAnimRotate.cpp b/libs/surfaceflinger/LayerOrientationAnimRotate.cpp
index a3bf014..dc6b632 100644
--- a/libs/surfaceflinger/LayerOrientationAnimRotate.cpp
+++ b/libs/surfaceflinger/LayerOrientationAnimRotate.cpp
@@ -68,10 +68,10 @@ LayerOrientationAnimRotate::LayerOrientationAnimRotate(
LayerOrientationAnimRotate::~LayerOrientationAnimRotate()
{
if (mTextureName != -1U) {
- LayerBase::deletedTextures.add(mTextureName);
+ glDeleteTextures(1, &mTextureName);
}
if (mTextureNameIn != -1U) {
- LayerBase::deletedTextures.add(mTextureNameIn);
+ glDeleteTextures(1, &mTextureNameIn);
}
}
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index fdfaad3..be91cdd 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -524,13 +524,6 @@ void SurfaceFlinger::postFramebuffer()
hw.flip(mInvalidRegion);
mInvalidRegion.clear();
-
- if (Layer::deletedTextures.size()) {
- glDeleteTextures(
- Layer::deletedTextures.size(),
- Layer::deletedTextures.array());
- Layer::deletedTextures.clear();
- }
}
}