surfaceflinger: remove ISurfaceComposer.h from RenderArea
RenderArea can be made more generic by removing ISurfaceComposer.h
dependency. The caller also prefers to work with
ui::Transform::orientation_flags than ISurfaceComposer::Rotation (we
want to move updateDimensions to the caller).
Bug: 113041375
Test: take screenshot, rotate screen, screencap
Change-Id: I16e1392d5c92c2f423f98307e867918415404d26
diff --git a/services/surfaceflinger/RenderArea.h b/services/surfaceflinger/RenderArea.h
index 61abaec..c12ff45 100644
--- a/services/surfaceflinger/RenderArea.h
+++ b/services/surfaceflinger/RenderArea.h
@@ -1,7 +1,5 @@
#pragma once
-#include <gui/ISurfaceComposer.h>
-#include <ui/GraphicTypes.h>
#include <ui/Transform.h>
#include <functional>
@@ -21,7 +19,11 @@
static float getCaptureFillValue(CaptureFill captureFill);
RenderArea(uint32_t reqWidth, uint32_t reqHeight, CaptureFill captureFill,
- ISurfaceComposer::Rotation rotation = ISurfaceComposer::eRotateNone);
+ ui::Transform::orientation_flags rotation = ui::Transform::ROT_0)
+ : mReqWidth(reqWidth),
+ mReqHeight(reqHeight),
+ mCaptureFill(captureFill),
+ mRotationFlags(rotation) {}
virtual ~RenderArea() = default;
@@ -73,8 +75,8 @@
private:
uint32_t mReqWidth;
uint32_t mReqHeight;
- ui::Transform::orientation_flags mRotationFlags;
- CaptureFill mCaptureFill;
+ const CaptureFill mCaptureFill;
+ const ui::Transform::orientation_flags mRotationFlags;
};
} // namespace android