summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2024-11-26 12:31:25 -0800
committer Lloyd Pique <lpique@google.com> 2024-11-26 12:47:38 -0800
commit6275776bb805535372b6976176b939b8fc3b030c (patch)
tree4bb5c7032bd60d2b74e658ff4391679248594f53
parent2721b5c64b03856a1b2e261c837a1b94749d101f (diff)
SF: Clean up warnings around AidlComposer.{h,cpp}
This CL was uploaded with some corresponding fixes affecting the ComposerCommandBuffer.h headers in hardware/interfaces. The pragmas to disable specific warnings when including those files are no longer needed, as those headers have been fixed. There were some warnings about using calling functions marked deprecated. For those I disabled the deprecation warning for the call, since SurfaceFlinger still needs to make the legacy call if that's what the vendor implementation supports. clangd also reported three unused "using ..." directives at the top of the file. I went ahead and remove these. Flag: EXEMPT build and lint warnings only Bug: None Test: Builds Change-Id: I160785bc44850ba8b202ed6874e1530d1fbe13e1
-rw-r--r--services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp13
-rw-r--r--services/surfaceflinger/DisplayHardware/AidlComposerHal.h8
2 files changed, 9 insertions, 12 deletions
diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
index 4c8ff58530..2f2af44793 100644
--- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
@@ -37,10 +37,6 @@
namespace android {
-using hardware::hidl_handle;
-using hardware::hidl_vec;
-using hardware::Return;
-
using aidl::android::hardware::graphics::composer3::BnComposerCallback;
using aidl::android::hardware::graphics::composer3::Capability;
using aidl::android::hardware::graphics::composer3::ClientTargetPropertyWithBrightness;
@@ -524,11 +520,15 @@ Error AidlComposer::getColorModes(Display display, std::vector<ColorMode>* outMo
Error AidlComposer::getDisplayAttribute(Display display, Config config,
IComposerClient::Attribute attribute, int32_t* outValue) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
const auto status =
mAidlComposerClient->getDisplayAttribute(translate<int64_t>(display),
translate<int32_t>(config),
static_cast<AidlDisplayAttribute>(attribute),
outValue);
+#pragma clang diagnostic pop
+
if (!status.isOk()) {
ALOGE("getDisplayAttribute failed %s", status.getDescription().c_str());
return static_cast<Error>(status.getServiceSpecificError());
@@ -538,8 +538,13 @@ Error AidlComposer::getDisplayAttribute(Display display, Config config,
Error AidlComposer::getDisplayConfigs(Display display, std::vector<Config>* outConfigs) {
std::vector<int32_t> configs;
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
const auto status =
mAidlComposerClient->getDisplayConfigs(translate<int64_t>(display), &configs);
+#pragma clang diagnostic pop
+
if (!status.isOk()) {
ALOGE("getDisplayConfigs failed %s", status.getDescription().c_str());
return static_cast<Error>(status.getServiceSpecificError());
diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.h b/services/surfaceflinger/DisplayHardware/AidlComposerHal.h
index 933e8d186f..7f7ecaa116 100644
--- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.h
+++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.h
@@ -27,11 +27,6 @@
#include <utility>
#include <vector>
-// TODO(b/129481165): remove the #pragma below and fix conversion issues
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wconversion"
-#pragma clang diagnostic ignored "-Wextra"
-
#include <android/hardware/graphics/composer/2.4/IComposer.h>
#include <android/hardware/graphics/composer/2.4/IComposerClient.h>
@@ -43,9 +38,6 @@
#include <aidl/android/hardware/graphics/composer3/Composition.h>
#include <aidl/android/hardware/graphics/composer3/DisplayCapability.h>
-// TODO(b/129481165): remove the #pragma below and fix conversion issues
-#pragma clang diagnostic pop // ignored "-Wconversion -Wextra"
-
namespace android::Hwc2 {
using aidl::android::hardware::graphics::common::DisplayDecorationSupport;