diff options
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 731d82b..517c335 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -145,6 +145,18 @@ sp<LayerBaseClient::Surface> Layer::createSurface() const return sur; } +status_t Layer::ditch() +{ + // NOTE: Called from the main UI thread + + // the layer is not on screen anymore. free as much resources as possible + mFreezeLock.clear(); + + Mutex::Autolock _l(mLock); + mWidth = mHeight = 0; + return NO_ERROR; +} + status_t Layer::setBuffers( uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { |