From 56c4b15aeea82af058c2049dee4cb21c741e01d9 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 3 Sep 2020 17:53:31 -0700 Subject: Remove obsolete DONT_USE_FENCE_SYNC option Unable to find any recent uses of DONT_USE_FENCE_SYNC and EGL_KHR_fence_sync is a CDD required extension, so device support must be present. So remove this last config option from libgui, and then also remove the dump methods that just return the library name. Test: builds Change-Id: I29362d6cb7ce9ef9f2338dcbf55814973abd6c3d --- libs/gui/Android.bp | 1 - libs/gui/GuiConfig.cpp | 31 ------------------------------ libs/gui/SyncFeatures.cpp | 8 -------- libs/gui/include/gui/GuiConfig.h | 29 ---------------------------- libs/ui/Android.bp | 1 - libs/ui/UiConfig.cpp | 28 --------------------------- libs/ui/include/ui/UiConfig.h | 29 ---------------------------- libs/ui/include_vndk/ui/UiConfig.h | 1 - services/surfaceflinger/SurfaceFlinger.cpp | 4 ---- 9 files changed, 132 deletions(-) delete mode 100644 libs/gui/GuiConfig.cpp delete mode 100644 libs/gui/include/gui/GuiConfig.h delete mode 100644 libs/ui/UiConfig.cpp delete mode 100644 libs/ui/include/ui/UiConfig.h delete mode 120000 libs/ui/include_vndk/ui/UiConfig.h diff --git a/libs/gui/Android.bp b/libs/gui/Android.bp index 9285b23d74..ae265cab8f 100644 --- a/libs/gui/Android.bp +++ b/libs/gui/Android.bp @@ -55,7 +55,6 @@ cc_library_shared { "DisplayEventDispatcher.cpp", "DisplayEventReceiver.cpp", "GLConsumer.cpp", - "GuiConfig.cpp", "IConsumerListener.cpp", "IDisplayEventConnection.cpp", "IGraphicBufferConsumer.cpp", diff --git a/libs/gui/GuiConfig.cpp b/libs/gui/GuiConfig.cpp deleted file mode 100644 index 3ec20ee0c0..0000000000 --- a/libs/gui/GuiConfig.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -namespace android { - -void appendGuiConfigString(std::string& configStr) { - static const char* config = - " [libgui" -#ifdef DONT_USE_FENCE_SYNC - " DONT_USE_FENCE_SYNC" -#endif - "]"; - configStr.append(config); -} - -}; // namespace android diff --git a/libs/gui/SyncFeatures.cpp b/libs/gui/SyncFeatures.cpp index 8df6e81596..1a8fc1a00a 100644 --- a/libs/gui/SyncFeatures.cpp +++ b/libs/gui/SyncFeatures.cpp @@ -71,15 +71,7 @@ bool SyncFeatures::useNativeFenceSync() const { return mHasNativeFenceSync; } bool SyncFeatures::useFenceSync() const { -#ifdef DONT_USE_FENCE_SYNC - // on some devices it's better to not use EGL_KHR_fence_sync - // even if they have it - return false; -#else - // currently we shall only attempt to use EGL_KHR_fence_sync if - // USE_FENCE_SYNC is set in our makefile return !mHasNativeFenceSync && mHasFenceSync; -#endif } bool SyncFeatures::useWaitSync() const { return (useNativeFenceSync() || useFenceSync()) && mHasWaitSync; diff --git a/libs/gui/include/gui/GuiConfig.h b/libs/gui/include/gui/GuiConfig.h deleted file mode 100644 index 7aa54321fd..0000000000 --- a/libs/gui/include/gui/GuiConfig.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_GUI_CONFIG_H -#define ANDROID_GUI_CONFIG_H - -#include - -namespace android { - -// Append the libgui configuration details to configStr. -void appendGuiConfigString(std::string& configStr); - -}; // namespace android - -#endif /*ANDROID_GUI_CONFIG_H*/ diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp index 2acc5bb14c..3fa2e53ca3 100644 --- a/libs/ui/Android.bp +++ b/libs/ui/Android.bp @@ -120,7 +120,6 @@ cc_library_shared { "PixelFormat.cpp", "PublicFormat.cpp", "Size.cpp", - "UiConfig.cpp", ], include_dirs: [ diff --git a/libs/ui/UiConfig.cpp b/libs/ui/UiConfig.cpp deleted file mode 100644 index 0ac863d718..0000000000 --- a/libs/ui/UiConfig.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -namespace android { - -void appendUiConfigString(std::string& configStr) { - static const char* config = - " [libui]"; - configStr.append(config); -} - - -}; // namespace android diff --git a/libs/ui/include/ui/UiConfig.h b/libs/ui/include/ui/UiConfig.h deleted file mode 100644 index d1d6014a7b..0000000000 --- a/libs/ui/include/ui/UiConfig.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_UI_CONFIG_H -#define ANDROID_UI_CONFIG_H - -#include - -namespace android { - -// Append the libui configuration details to configStr. -void appendUiConfigString(std::string& configStr); - -}; // namespace android - -#endif /*ANDROID_UI_CONFIG_H*/ diff --git a/libs/ui/include_vndk/ui/UiConfig.h b/libs/ui/include_vndk/ui/UiConfig.h deleted file mode 120000 index f580ce1095..0000000000 --- a/libs/ui/include_vndk/ui/UiConfig.h +++ /dev/null @@ -1 +0,0 @@ -../../include/ui/UiConfig.h \ No newline at end of file diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 9e5b8d8d7e..e6417ad740 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include @@ -75,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -4725,8 +4723,6 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co result.append("Build configuration:"); colorizer.reset(result); appendSfConfigString(result); - appendUiConfigString(result); - appendGuiConfigString(result); result.append("\n"); result.append("\nDisplay identification data:\n"); -- cgit v1.2.3-59-g8ed1b