StretchEffect changes
Bug: 179047472
Test: StretchySurfaceViewActivity in HwAccelerationTests
Change-Id: Ia1fcd6136a380bb7099fae08ceb024eae4f79ac8
diff --git a/libs/gui/LayerDebugInfo.cpp b/libs/gui/LayerDebugInfo.cpp
index cdde9a2..e707684 100644
--- a/libs/gui/LayerDebugInfo.cpp
+++ b/libs/gui/LayerDebugInfo.cpp
@@ -61,6 +61,7 @@
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 @@
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 @@
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),