[SF, CE] Rename viewport, frame and destinationClip

This change introduces a new class ProjectionSpace and uses
it in OutputCompositionState to describe the layer stack space,
the physical display space and the oriented display space.
We rename viewport to layerStackSpaceRect, frame to
orientedDisplaySpaceRect and destinationClip displaySpaceRect.
This aims to provide better readibility of the code and
it's also consistent with SurfaceControl.setDisplayProjction
where layerStackRect and displayRect are used for viewport
and frame.

Bug: 161793589
Bug: 160404780
Test: m && flash device
Test: atest libsurfaceflinger_unittest libcompositionengine_test
Test: adb shell dumpsys SurfaceFlinger
Change-Id: Iee20b908157cbef4de4d9addf429f98356ec942d
diff --git a/services/surfaceflinger/DisplayRenderArea.cpp b/services/surfaceflinger/DisplayRenderArea.cpp
index d7157b1..9a6b328 100644
--- a/services/surfaceflinger/DisplayRenderArea.cpp
+++ b/services/surfaceflinger/DisplayRenderArea.cpp
@@ -49,7 +49,7 @@
 DisplayRenderArea::DisplayRenderArea(sp<const DisplayDevice> display, const Rect& sourceCrop,
                                      ui::Size reqSize, ui::Dataspace reqDataSpace,
                                      bool useIdentityTransform, bool allowSecureLayers)
-      : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, display->getViewport(),
+      : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, display->getLayerStackSpaceRect(),
                    allowSecureLayers, applyDeviceOrientation(useIdentityTransform, *display)),
         mDisplay(std::move(display)),
         mSourceCrop(sourceCrop) {}
@@ -93,7 +93,7 @@
 Rect DisplayRenderArea::getSourceCrop() const {
     // use the projected display viewport by default.
     if (mSourceCrop.isEmpty()) {
-        return mDisplay->getViewport();
+        return mDisplay->getLayerStackSpaceRect();
     }
 
     // Correct for the orientation when the screen capture request contained
@@ -101,8 +101,8 @@
     // it needs to rotate based on the screen orientation to allow the screenshot
     // to be taken in the ROT_0 orientation
     const auto flags = getRotationFlags();
-    int width = mDisplay->getViewport().getWidth();
-    int height = mDisplay->getViewport().getHeight();
+    int width = mDisplay->getLayerStackSpaceRect().getWidth();
+    int height = mDisplay->getLayerStackSpaceRect().getHeight();
     ui::Transform rotation;
     rotation.set(flags, width, height);
     return rotation.transform(mSourceCrop);