get rid of an old hack to work around a bug around glDeleteTextures() in the adreno drivers
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -72,8 +72,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
static Vector<GLuint> deletedTextures;
|
||||
|
||||
LayerBase(SurfaceFlinger* flinger, DisplayID display);
|
||||
|
||||
DisplayID dpy;
|
||||
|
||||
@@ -47,8 +47,7 @@ LayerBlur::LayerBlur(SurfaceFlinger* flinger, DisplayID display,
|
||||
LayerBlur::~LayerBlur()
|
||||
{
|
||||
if (mTextureName != -1U) {
|
||||
//glDeleteTextures(1, &mTextureName);
|
||||
deletedTextures.add(mTextureName);
|
||||
glDeleteTextures(1, &mTextureName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ LayerBuffer::BufferSource::BufferSource(LayerBuffer& layer,
|
||||
LayerBuffer::BufferSource::~BufferSource()
|
||||
{
|
||||
if (mTextureName != -1U) {
|
||||
LayerBase::deletedTextures.add(mTextureName);
|
||||
glDeleteTextures(1, &mTextureName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user