Add a LayerScreenshot

A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index feb2c52..76a2caa 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -88,16 +88,8 @@
 
 Layer::~Layer()
 {
-    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) );
+    mFlinger->postMessageAsync(
+            new SurfaceFlinger::MessageDestroyGLTexture(mTextureName) );
 }
 
 void Layer::onFrameQueued() {