Remove displayBounds when computing layer bounds

Display bounds will be applied later in CE and RE so there's no need for
them to be used when computing the layer bounds. This fixes a few
issues:

1. Accessibility can now get the real bounds of the window, even if it's
offscreen when magnified

2. Screenrecord rotation flicker is fixed. This was caused by the
multiple calculation using different display bounds and caching the last
value

3. Reducing number of calls to computeBounds. We now only call it once
where previously we'd call it once per display. Each computeBounds
traverses down the entire hierarchy so it can be inefficient.

Test: Existing tests pass. WindowInfo has bounds outside display
Bug: 188792659
Fixes: 140855415
Change-Id: I1f5072adb674c7c4dacb6a392473821968c67767
diff --git a/services/surfaceflinger/tests/EffectLayer_test.cpp b/services/surfaceflinger/tests/EffectLayer_test.cpp
index 1361ded..9fa0452 100644
--- a/services/surfaceflinger/tests/EffectLayer_test.cpp
+++ b/services/surfaceflinger/tests/EffectLayer_test.cpp
@@ -176,6 +176,15 @@
     }
 }
 
+TEST_F(EffectLayerTest, EffectLayerWithColorNoCrop) {
+    const auto display = SurfaceComposerClient::getInternalDisplayToken();
+    ui::DisplayMode mode;
+    ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getActiveDisplayMode(display, &mode));
+    const ui::Size& resolution = mode.resolution;
+    auto shot = screenshot();
+    shot->expectColor(Rect(0, 0, resolution.getWidth(), resolution.getHeight()), Color::RED);
+}
+
 } // namespace android
 
 // TODO(b/129481165): remove the #pragma below and fix conversion issues