Optimize offscreen layer management

Now that we manage reparenting on the main thread, we can directly
manipulate the offscreen layers list rather than updating it
in a later traversal.

Bug: 186200583
Test: Existing tests pass
Change-Id: I9b101544c272b60d2d93d09b3cc6074098181cf3
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index ad31b3f..1985ecb 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -254,6 +254,7 @@
     if (mRemovedFromDrawingState) {
         mRemovedFromDrawingState = false;
         mFlinger->mScheduler->registerLayer(this);
+        mFlinger->removeFromOffscreenLayers(this);
     }
 
     for (const auto& child : mCurrentChildren) {