diff options
| author | 2011-10-13 16:02:48 -0700 | |
|---|---|---|
| committer | 2011-10-18 20:21:47 -0700 | |
| commit | 0ab84ef507f23505a72798fbe25cf4bb2c507ea3 (patch) | |
| tree | ea360721418d5b13c376c4f2bcbb4066ebb65f93 /services/surfaceflinger/Layer.cpp | |
| parent | 526f0a0e158cf46c244edc57624c15ebce26c71f (diff) | |
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.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 34a0d73c2b73..f885fc7fbf71 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() { |