summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-10-13 16:02:48 -0700
committerMathias Agopian <mathias@google.com>2011-10-18 20:21:47 -0700
commit118d0245ee0a3b107055782aa8b555404b6f0280 (patch)
treed972c2f51239dcdf92ecb4ec71848389cda1c886 /services/surfaceflinger/Layer.cpp
parent3a3cad30c40c8eb87671262a9fe7f0e214b6a934 (diff)
downloadframeworks_native-118d0245ee0a3b107055782aa8b555404b6f0280.zip
frameworks_native-118d0245ee0a3b107055782aa8b555404b6f0280.tar.gz
frameworks_native-118d0245ee0a3b107055782aa8b555404b6f0280.tar.bz2
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. Make sure to call compositionComplete() after rendering into a FBO. Bug: 5446982, 5467587, 5466259 Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 34a0d73..f885fc7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -88,16 +88,8 @@ void Layer::onFirstRef()
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() {