Use DisplayCaptureArgs for displayCapture functions.
Updated displayCapture functions to use the DisplayCaptureArgs and
ScreenCaptureResults instead of the list of arguments and out arguments.
This only updated the native code, not JNI or Java
Test: display screenshot + secure works
Test: adb shell screencap
Test: SurfaceFlinger_test
Bug: 162367424
Change-Id: I5210a0881c96436c128c3ffb328a5a6ee01beca7
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 2c4e40d..55f8034 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -433,13 +433,10 @@
ISurfaceComposer::VsyncSource vsyncSource = eVsyncSourceApp,
ISurfaceComposer::ConfigChanged configChanged =
ISurfaceComposer::eConfigChangedSuppress) override;
- status_t captureScreen(const sp<IBinder>& displayToken, sp<GraphicBuffer>* outBuffer,
- bool& outCapturedSecureLayers, ui::Dataspace reqDataspace,
- ui::PixelFormat reqPixelFormat, const Rect& sourceCrop,
- uint32_t reqWidth, uint32_t reqHeight, bool useIdentityTransform,
- ui::Rotation rotation, bool captureSecureLayers) override;
- status_t captureScreen(uint64_t displayOrLayerStack, ui::Dataspace* outDataspace,
- sp<GraphicBuffer>* outBuffer) override;
+ status_t captureDisplay(const DisplayCaptureArgs& args,
+ ScreenCaptureResults& captureResults) override;
+ status_t captureDisplay(uint64_t displayOrLayerStack,
+ ScreenCaptureResults& captureResults) override;
status_t captureLayers(
const sp<IBinder>& parentHandle, sp<GraphicBuffer>* outBuffer,
const ui::Dataspace reqDataspace, const ui::PixelFormat reqPixelFormat,