SurfaceFlinger: Add mode to apply position with resize.

For some cases, like scaled windows with shadows,
we need to be able to apply the position concurrent with
window resize. This is because the scaling of the shadows causes
the top left coordinate of the non shadow surface content
to change before and after the resize.

Bug: 28899837
Change-Id: I522eacfbbcd79707dc1e5ab71901a263b3004ba9
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 7d085a4..ba7184f 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -145,7 +145,7 @@
     status_t setBuffers(uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);
 
     // modify current state
-    bool setPosition(float x, float y);
+    bool setPosition(float x, float y, bool immediate);
     bool setLayer(uint32_t z);
     bool setSize(uint32_t w, uint32_t h);
 #ifdef USE_HWC2
@@ -596,6 +596,7 @@
     bool mUpdateTexImageFailed; // This is only modified from the main thread
 
     bool mAutoRefresh;
+    bool mFreezePositionUpdates;
 };
 
 // ---------------------------------------------------------------------------