Initial unified commit for Android 11, syncing up to v311
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
From 2f797421c012a59fbf429d2c39c61a871f2994ca Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 01:43:34 +0000
|
||||
Subject: [PATCH] Revert "surfaceflinger: Add support for extension lib"
|
||||
|
||||
This reverts commit 381416d540ea92dca5f64cd48fd8c9dc887cac7b.
|
||||
---
|
||||
services/surfaceflinger/BufferQueueLayer.cpp | 11 +-------
|
||||
.../CompositionEngine/Android.bp | 13 +--------
|
||||
.../include/compositionengine/FodExtension.h | 28 -------------------
|
||||
.../CompositionEngine/src/FodExtension.cpp | 27 ------------------
|
||||
.../CompositionEngine/src/OutputLayer.cpp | 10 +------
|
||||
5 files changed, 3 insertions(+), 86 deletions(-)
|
||||
delete mode 100644 services/surfaceflinger/CompositionEngine/include/compositionengine/FodExtension.h
|
||||
delete mode 100644 services/surfaceflinger/CompositionEngine/src/FodExtension.cpp
|
||||
|
||||
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
index 87be9a821..6e4235e40 100644
|
||||
--- a/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "BufferQueueLayer.h"
|
||||
|
||||
#include <compositionengine/LayerFECompositionState.h>
|
||||
-#include <compositionengine/FodExtension.h>
|
||||
#include <gui/BufferQueueConsumer.h>
|
||||
#include <system/window.h>
|
||||
|
||||
@@ -515,17 +514,9 @@ status_t BufferQueueLayer::setDefaultBufferProperties(uint32_t w, uint32_t h, Pi
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
- uint64_t usageBits = getEffectiveUsage(0);
|
||||
-
|
||||
- if (mName == FOD_LAYER_NAME) {
|
||||
- usageBits = getFodUsageBits(usageBits, false);
|
||||
- } else if (mName == FOD_TOUCHED_LAYER_NAME) {
|
||||
- usageBits = getFodUsageBits(usageBits, true);
|
||||
- }
|
||||
-
|
||||
setDefaultBufferSize(w, h);
|
||||
mConsumer->setDefaultBufferFormat(format);
|
||||
- mConsumer->setConsumerUsageBits(usageBits);
|
||||
+ mConsumer->setConsumerUsageBits(getEffectiveUsage(0));
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
diff --git a/services/surfaceflinger/CompositionEngine/Android.bp b/services/surfaceflinger/CompositionEngine/Android.bp
|
||||
index d205a19df..b3b9fe598 100644
|
||||
--- a/services/surfaceflinger/CompositionEngine/Android.bp
|
||||
+++ b/services/surfaceflinger/CompositionEngine/Android.bp
|
||||
@@ -41,10 +41,7 @@ cc_defaults {
|
||||
|
||||
cc_library {
|
||||
name: "libcompositionengine",
|
||||
- defaults: [
|
||||
- "libcompositionengine_defaults",
|
||||
- "surfaceflinger_fod_lib_defaults",
|
||||
- ],
|
||||
+ defaults: ["libcompositionengine_defaults"],
|
||||
srcs: [
|
||||
"src/ClientCompositionRequestCache.cpp",
|
||||
"src/CompositionEngine.cpp",
|
||||
@@ -87,14 +84,6 @@ cc_library {
|
||||
export_include_dirs: ["include"],
|
||||
}
|
||||
|
||||
-cc_library_static {
|
||||
- name: "surfaceflinger_fod_lib",
|
||||
- srcs: [
|
||||
- "src/FodExtension.cpp",
|
||||
- ],
|
||||
- export_include_dirs: ["include"],
|
||||
-}
|
||||
-
|
||||
cc_test {
|
||||
name: "libcompositionengine_test",
|
||||
test_suites: ["device-tests"],
|
||||
diff --git a/services/surfaceflinger/CompositionEngine/include/compositionengine/FodExtension.h b/services/surfaceflinger/CompositionEngine/include/compositionengine/FodExtension.h
|
||||
deleted file mode 100644
|
||||
index 3585f63d9..000000000
|
||||
--- a/services/surfaceflinger/CompositionEngine/include/compositionengine/FodExtension.h
|
||||
+++ /dev/null
|
||||
@@ -1,28 +0,0 @@
|
||||
-/*
|
||||
- * Copyright 2020 The LineageOS 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 <stdint.h>
|
||||
-
|
||||
-#ifndef __FOD_EXTENSION__H__
|
||||
-#define __FOD_EXTENSION__H__
|
||||
-
|
||||
-#define FOD_LAYER_NAME "Fingerprint on display#0"
|
||||
-#define FOD_TOUCHED_LAYER_NAME "Fingerprint on display.touched#0"
|
||||
-
|
||||
-extern uint32_t getFodZOrder(uint32_t z, bool touched);
|
||||
-extern uint64_t getFodUsageBits(uint64_t usageBits, bool touched);
|
||||
-
|
||||
-#endif /* __FOD_EXTENSION__H__ */
|
||||
diff --git a/services/surfaceflinger/CompositionEngine/src/FodExtension.cpp b/services/surfaceflinger/CompositionEngine/src/FodExtension.cpp
|
||||
deleted file mode 100644
|
||||
index dff24c2c6..000000000
|
||||
--- a/services/surfaceflinger/CompositionEngine/src/FodExtension.cpp
|
||||
+++ /dev/null
|
||||
@@ -1,27 +0,0 @@
|
||||
-/*
|
||||
- * Copyright 2020 The LineageOS 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 TARGET_PROVIDES_FOD_LIB
|
||||
-#include <compositionengine/FodExtension.h>
|
||||
-
|
||||
-uint32_t getFodZOrder(uint32_t z, __unused bool touched) {
|
||||
- return z;
|
||||
-}
|
||||
-
|
||||
-uint64_t getFodUsageBits(uint64_t usageBits, __unused bool touched) {
|
||||
- return usageBits;
|
||||
-}
|
||||
-#endif
|
||||
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
|
||||
index ebf651ee8..1faf775ed 100644
|
||||
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
|
||||
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <compositionengine/DisplayColorProfile.h>
|
||||
-#include <compositionengine/FodExtension.h>
|
||||
#include <compositionengine/LayerFE.h>
|
||||
#include <compositionengine/LayerFECompositionState.h>
|
||||
#include <compositionengine/Output.h>
|
||||
@@ -371,14 +370,7 @@ void OutputLayer::writeOutputDependentGeometryStateToHWC(
|
||||
static_cast<int32_t>(error));
|
||||
}
|
||||
|
||||
- uint32_t z = outputDependentState.z;
|
||||
- if (strcmp(getLayerFE().getDebugName(), FOD_LAYER_NAME) == 0) {
|
||||
- z = getFodZOrder(z, false);
|
||||
- } else if (strcmp(getLayerFE().getDebugName(), FOD_TOUCHED_LAYER_NAME) == 0) {
|
||||
- z = getFodZOrder(z, true);
|
||||
- }
|
||||
-
|
||||
- if (auto error = hwcLayer->setZOrder(z); error != hal::Error::NONE) {
|
||||
+ if (auto error = hwcLayer->setZOrder(outputDependentState.z); error != hal::Error::NONE) {
|
||||
ALOGE("[%s] Failed to set Z %u: %s (%d)", getLayerFE().getDebugName(),
|
||||
outputDependentState.z, to_string(error).c_str(), static_cast<int32_t>(error));
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user