More cleanups

Change-Id: Id5967944b949a2aec57e4fe9fdcdc04c11b8c35a
diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp
index 02b0372..836de45 100644
--- a/libs/hwui/DeferredLayerUpdater.cpp
+++ b/libs/hwui/DeferredLayerUpdater.cpp
@@ -119,5 +119,13 @@
     }
 }
 
+void DeferredLayerUpdater::detachSurfaceTexture() {
+    if (mSurfaceTexture.get()) {
+        mSurfaceTexture->detachFromContext();
+        mSurfaceTexture = 0;
+        mLayer->clearTexture();
+    }
+}
+
 } /* namespace uirenderer */
 } /* namespace android */