summaryrefslogtreecommitdiff
path: root/libs/gui/LayerDebugInfo.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2021-02-22 22:30:28 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-02-22 22:30:28 +0000
commita8109d468ad5beb766e385ae213398ad0c97c23b (patch)
tree26d21add15aa00f2cc4ec081f1c23472625661d2 /libs/gui/LayerDebugInfo.cpp
parentec1691271f4732807a21fd678bfddb3c7b25c3ae (diff)
parentc00c669cbc76f201879ebf2e0ce60d386a0fa483 (diff)
Merge "StretchEffect changes" into sc-dev
Diffstat (limited to 'libs/gui/LayerDebugInfo.cpp')
-rw-r--r--libs/gui/LayerDebugInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/LayerDebugInfo.cpp b/libs/gui/LayerDebugInfo.cpp
index cdde9a2308..e707684618 100644
--- a/libs/gui/LayerDebugInfo.cpp
+++ b/libs/gui/LayerDebugInfo.cpp
@@ -61,6 +61,7 @@ status_t LayerDebugInfo::writeToParcel(Parcel* parcel) const {
RETURN_ON_ERROR(parcel->writeBool(mRefreshPending));
RETURN_ON_ERROR(parcel->writeBool(mIsOpaque));
RETURN_ON_ERROR(parcel->writeBool(mContentDirty));
+ RETURN_ON_ERROR(parcel->write(mStretchEffect));
return NO_ERROR;
}
@@ -105,6 +106,7 @@ status_t LayerDebugInfo::readFromParcel(const Parcel* parcel) {
RETURN_ON_ERROR(parcel->readBool(&mRefreshPending));
RETURN_ON_ERROR(parcel->readBool(&mIsOpaque));
RETURN_ON_ERROR(parcel->readBool(&mContentDirty));
+ RETURN_ON_ERROR(parcel->read(mStretchEffect));
return NO_ERROR;
}
@@ -115,6 +117,12 @@ std::string to_string(const LayerDebugInfo& info) {
info.mTransparentRegion.dump(result, "TransparentRegion");
info.mVisibleRegion.dump(result, "VisibleRegion");
info.mSurfaceDamageRegion.dump(result, "SurfaceDamageRegion");
+ if (info.mStretchEffect.hasEffect()) {
+ const auto& se = info.mStretchEffect;
+ StringAppendF(&result, " StretchEffect area=[%f, %f, %f, %f] vec=(%f, %f) maxAmount=%f\n",
+ se.area.left, se.area.top, se.area.right, se.area.bottom, se.vectorX,
+ se.vectorY, se.maxAmount);
+ }
StringAppendF(&result, " layerStack=%4d, z=%9d, pos=(%g,%g), size=(%4d,%4d), ",
info.mLayerStack, info.mZ, static_cast<double>(info.mX),