summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2021-03-19 17:39:20 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-03-19 17:39:20 +0000
commit81a9915ec7dffe4e553c1a9ccf7a58d994ba3cc5 (patch)
tree9e962309f49c7aa88458b86a2e75b6195612aa65 /libs
parent492ff41f26fda887c1facbfe6d28d10f0782d800 (diff)
parent8cbd3075e57963c7bfc2e863cca3d7d2176e3e73 (diff)
Merge changes from topic "eEarlyWakeup_remove" into sc-dev
* changes: SF: rename ExplicitEarlyWakeup -> EarlyWakeup SurfaceFlinger: remove ISurfaceComposer::eEarlyWakeup
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp55
-rw-r--r--libs/gui/include/gui/ISurfaceComposer.h9
-rw-r--r--libs/gui/include/gui/SurfaceComposerClient.h10
3 files changed, 28 insertions, 46 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 11fe49039d..95c961ef3e 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -470,9 +470,8 @@ SurfaceComposerClient::Transaction::Transaction(const Transaction& other)
mForceSynchronous(other.mForceSynchronous),
mTransactionNestCount(other.mTransactionNestCount),
mAnimation(other.mAnimation),
- mEarlyWakeup(other.mEarlyWakeup),
- mExplicitEarlyWakeupStart(other.mExplicitEarlyWakeupStart),
- mExplicitEarlyWakeupEnd(other.mExplicitEarlyWakeupEnd),
+ mEarlyWakeupStart(other.mEarlyWakeupStart),
+ mEarlyWakeupEnd(other.mEarlyWakeupEnd),
mContainsBuffer(other.mContainsBuffer),
mDesiredPresentTime(other.mDesiredPresentTime),
mIsAutoTimestamp(other.mIsAutoTimestamp),
@@ -501,9 +500,8 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel
const uint32_t forceSynchronous = parcel->readUint32();
const uint32_t transactionNestCount = parcel->readUint32();
const bool animation = parcel->readBool();
- const bool earlyWakeup = parcel->readBool();
- const bool explicitEarlyWakeupStart = parcel->readBool();
- const bool explicitEarlyWakeupEnd = parcel->readBool();
+ const bool earlyWakeupStart = parcel->readBool();
+ const bool earlyWakeupEnd = parcel->readBool();
const bool containsBuffer = parcel->readBool();
const int64_t desiredPresentTime = parcel->readInt64();
const bool isAutoTimestamp = parcel->readBool();
@@ -578,9 +576,8 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel
mForceSynchronous = forceSynchronous;
mTransactionNestCount = transactionNestCount;
mAnimation = animation;
- mEarlyWakeup = earlyWakeup;
- mExplicitEarlyWakeupStart = explicitEarlyWakeupStart;
- mExplicitEarlyWakeupEnd = explicitEarlyWakeupEnd;
+ mEarlyWakeupStart = earlyWakeupStart;
+ mEarlyWakeupEnd = earlyWakeupEnd;
mContainsBuffer = containsBuffer;
mDesiredPresentTime = desiredPresentTime;
mIsAutoTimestamp = isAutoTimestamp;
@@ -610,9 +607,8 @@ status_t SurfaceComposerClient::Transaction::writeToParcel(Parcel* parcel) const
parcel->writeUint32(mForceSynchronous);
parcel->writeUint32(mTransactionNestCount);
parcel->writeBool(mAnimation);
- parcel->writeBool(mEarlyWakeup);
- parcel->writeBool(mExplicitEarlyWakeupStart);
- parcel->writeBool(mExplicitEarlyWakeupEnd);
+ parcel->writeBool(mEarlyWakeupStart);
+ parcel->writeBool(mEarlyWakeupEnd);
parcel->writeBool(mContainsBuffer);
parcel->writeInt64(mDesiredPresentTime);
parcel->writeBool(mIsAutoTimestamp);
@@ -690,9 +686,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr
mInputWindowCommands.merge(other.mInputWindowCommands);
mContainsBuffer |= other.mContainsBuffer;
- mEarlyWakeup = mEarlyWakeup || other.mEarlyWakeup;
- mExplicitEarlyWakeupStart = mExplicitEarlyWakeupStart || other.mExplicitEarlyWakeupStart;
- mExplicitEarlyWakeupEnd = mExplicitEarlyWakeupEnd || other.mExplicitEarlyWakeupEnd;
+ mEarlyWakeupStart = mEarlyWakeupStart || other.mEarlyWakeupStart;
+ mEarlyWakeupEnd = mEarlyWakeupEnd || other.mEarlyWakeupEnd;
mApplyToken = other.mApplyToken;
mFrameTimelineInfo.merge(other.mFrameTimelineInfo);
@@ -710,9 +705,8 @@ void SurfaceComposerClient::Transaction::clear() {
mForceSynchronous = 0;
mTransactionNestCount = 0;
mAnimation = false;
- mEarlyWakeup = false;
- mExplicitEarlyWakeupStart = false;
- mExplicitEarlyWakeupEnd = false;
+ mEarlyWakeupStart = false;
+ mEarlyWakeupEnd = false;
mDesiredPresentTime = 0;
mIsAutoTimestamp = true;
mFrameTimelineInfo.clear();
@@ -831,17 +825,14 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous) {
if (mAnimation) {
flags |= ISurfaceComposer::eAnimation;
}
- if (mEarlyWakeup) {
- flags |= ISurfaceComposer::eEarlyWakeup;
- }
- // If both mExplicitEarlyWakeupStart and mExplicitEarlyWakeupEnd are set
+ // If both mEarlyWakeupStart and mEarlyWakeupEnd are set
// it is equivalent for none
- if (mExplicitEarlyWakeupStart && !mExplicitEarlyWakeupEnd) {
- flags |= ISurfaceComposer::eExplicitEarlyWakeupStart;
+ if (mEarlyWakeupStart && !mEarlyWakeupEnd) {
+ flags |= ISurfaceComposer::eEarlyWakeupStart;
}
- if (mExplicitEarlyWakeupEnd && !mExplicitEarlyWakeupStart) {
- flags |= ISurfaceComposer::eExplicitEarlyWakeupEnd;
+ if (mEarlyWakeupEnd && !mEarlyWakeupStart) {
+ flags |= ISurfaceComposer::eEarlyWakeupEnd;
}
sp<IBinder> applyToken = mApplyToken
@@ -892,16 +883,12 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() {
mAnimation = true;
}
-void SurfaceComposerClient::Transaction::setEarlyWakeup() {
- mEarlyWakeup = true;
-}
-
-void SurfaceComposerClient::Transaction::setExplicitEarlyWakeupStart() {
- mExplicitEarlyWakeupStart = true;
+void SurfaceComposerClient::Transaction::setEarlyWakeupStart() {
+ mEarlyWakeupStart = true;
}
-void SurfaceComposerClient::Transaction::setExplicitEarlyWakeupEnd() {
- mExplicitEarlyWakeupEnd = true;
+void SurfaceComposerClient::Transaction::setEarlyWakeupEnd() {
+ mEarlyWakeupEnd = true;
}
layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) {
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h
index 2a9e3f7923..35990d171a 100644
--- a/libs/gui/include/gui/ISurfaceComposer.h
+++ b/libs/gui/include/gui/ISurfaceComposer.h
@@ -90,18 +90,15 @@ public:
eSynchronous = 0x01,
eAnimation = 0x02,
- // DEPRECATED - use eExplicitEarlyWakeup[Start|End]
- eEarlyWakeup = 0x04,
-
// Explicit indication that this transaction and others to follow will likely result in a
// lot of layers being composed, and thus, SurfaceFlinger should wake-up earlier to avoid
// missing frame deadlines. In this case SurfaceFlinger will wake up at
// (sf vsync offset - debug.sf.early_phase_offset_ns). SurfaceFlinger will continue to be
- // in the early configuration until it receives eExplicitEarlyWakeupEnd. These flags are
+ // in the early configuration until it receives eEarlyWakeupEnd. These flags are
// expected to be used by WindowManager only and are guarded by
// android.permission.ACCESS_SURFACE_FLINGER
- eExplicitEarlyWakeupStart = 0x08,
- eExplicitEarlyWakeupEnd = 0x10,
+ eEarlyWakeupStart = 0x08,
+ eEarlyWakeupEnd = 0x10,
};
enum VsyncSource {
diff --git a/libs/gui/include/gui/SurfaceComposerClient.h b/libs/gui/include/gui/SurfaceComposerClient.h
index f29983cef7..a91de9c645 100644
--- a/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/libs/gui/include/gui/SurfaceComposerClient.h
@@ -353,9 +353,8 @@ public:
uint32_t mForceSynchronous = 0;
uint32_t mTransactionNestCount = 0;
bool mAnimation = false;
- bool mEarlyWakeup = false;
- bool mExplicitEarlyWakeupStart = false;
- bool mExplicitEarlyWakeupEnd = false;
+ bool mEarlyWakeupStart = false;
+ bool mEarlyWakeupEnd = false;
// Indicates that the Transaction contains a buffer that should be cached
bool mContainsBuffer = false;
@@ -567,9 +566,8 @@ public:
const Rect& layerStackRect, const Rect& displayRect);
void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height);
void setAnimationTransaction();
- void setEarlyWakeup();
- void setExplicitEarlyWakeupStart();
- void setExplicitEarlyWakeupEnd();
+ void setEarlyWakeupStart();
+ void setEarlyWakeupEnd();
};
status_t clearLayerFrameStats(const sp<IBinder>& token) const;