From 8c9cff232b4cd77692cb50304bbfaa1617bde0fb Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 21 Sep 2022 18:11:50 +0200 Subject: [PATCH] libgui/libui: Add and run clang-format Change-Id: I34ad46b99904e48be1a273486a42e0dc7edea48f --- libgui/.clang-format | 1 + libgui/gui_shim.cpp | 10 ++++++---- libui/.clang-format | 1 + libui/GraphicBuffer.cpp | 5 +++-- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 120000 libgui/.clang-format create mode 120000 libui/.clang-format diff --git a/libgui/.clang-format b/libgui/.clang-format new file mode 120000 index 0000000..0457b53 --- /dev/null +++ b/libgui/.clang-format @@ -0,0 +1 @@ +../../../../build/soong/scripts/system-clang-format \ No newline at end of file diff --git a/libgui/gui_shim.cpp b/libgui/gui_shim.cpp index 28d438f..e5f358e 100644 --- a/libgui/gui_shim.cpp +++ b/libgui/gui_shim.cpp @@ -14,17 +14,19 @@ limitations under the License. */ -#include #include +#include using android::IBinder; using android::IGraphicBufferProducer; using android::sp; extern "C" void _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEbRKNS1_INS_7IBinderEEE( - const sp& bufferProducer, bool controlledByApp, const sp& surfaceControlHandle); + const sp& bufferProducer, bool controlledByApp, + const sp& surfaceControlHandle); extern "C" void _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEb( - const sp& bufferProducer, bool controlledByApp) { - _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEbRKNS1_INS_7IBinderEEE(bufferProducer, controlledByApp, NULL); + const sp& bufferProducer, bool controlledByApp) { + _ZN7android7SurfaceC1ERKNS_2spINS_22IGraphicBufferProducerEEEbRKNS1_INS_7IBinderEEE( + bufferProducer, controlledByApp, NULL); } diff --git a/libui/.clang-format b/libui/.clang-format new file mode 120000 index 0000000..0457b53 --- /dev/null +++ b/libui/.clang-format @@ -0,0 +1 @@ +../../../../build/soong/scripts/system-clang-format \ No newline at end of file diff --git a/libui/GraphicBuffer.cpp b/libui/GraphicBuffer.cpp index 4b4b61a..1ba91eb 100644 --- a/libui/GraphicBuffer.cpp +++ b/libui/GraphicBuffer.cpp @@ -17,9 +17,10 @@ #include extern "C" void _ZN7android13GraphicBuffer4lockEjPPvPiS3_(void* thisptr, uint32_t inUsage, - void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride); + void** vaddr, int32_t* outBytesPerPixel, + int32_t* outBytesPerStride); extern "C" void _ZN7android13GraphicBuffer4lockEjPPv(void* thisptr, uint32_t inUsage, - void** vaddr) { + void** vaddr) { _ZN7android13GraphicBuffer4lockEjPPvPiS3_(thisptr, inUsage, vaddr, nullptr, nullptr); }