summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-10-17 11:32:19 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-17 11:32:19 -0700
commita3dca6fdaacf9ffea4a844848a53c1adeb089897 (patch)
tree584269bf3494ddddfbbacfb57a6a6e43225fe144 /services/surfaceflinger/Layer.cpp
parentf7ae86f61ba7b326a33e53c3bbb87ebf212f543d (diff)
parent840b8a678537519c27ddf2f818494eaa20a135d4 (diff)
downloadframeworks_base-a3dca6fdaacf9ffea4a844848a53c1adeb089897.zip
frameworks_base-a3dca6fdaacf9ffea4a844848a53c1adeb089897.tar.gz
frameworks_base-a3dca6fdaacf9ffea4a844848a53c1adeb089897.tar.bz2
am 840b8a67: Revert "Add a LayerScreenshot"
* commit '840b8a678537519c27ddf2f818494eaa20a135d4': Revert "Add a LayerScreenshot"
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 2b8d113..b695903 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -88,8 +88,16 @@ void Layer::onFirstRef()
Layer::~Layer()
{
- mFlinger->postMessageAsync(
- new SurfaceFlinger::MessageDestroyGLTexture(mTextureName) );
+ class MessageDestroyGLState : public MessageBase {
+ GLuint texture;
+ public:
+ MessageDestroyGLState(GLuint texture) : texture(texture) { }
+ virtual bool handler() {
+ glDeleteTextures(1, &texture);
+ return true;
+ }
+ };
+ mFlinger->postMessageAsync( new MessageDestroyGLState(mTextureName) );
}
void Layer::onFrameQueued() {