Loading libs/gui/LayerDebugInfo.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; } Loading @@ -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), Loading libs/gui/LayerState.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eAutoRefreshChanged; autoRefresh = other.autoRefresh; } if (other.what & eStretchChanged) { what |= eStretchChanged; stretchEffect = other.stretchEffect; } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, Loading libs/gui/include/gui/LayerDebugInfo.h +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <ui/PixelFormat.h> #include <ui/Region.h> #include <ui/StretchEffect.h> #include <string> #include <math/vec4.h> Loading Loading @@ -66,6 +67,7 @@ public: bool mRefreshPending = false; bool mIsOpaque = false; bool mContentDirty = false; StretchEffect mStretchEffect = {}; }; std::string to_string(const LayerDebugInfo& info); Loading libs/ui/include/ui/FloatRect.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: float top = 0.0f; float right = 0.0f; float bottom = 0.0f; constexpr bool isEmpty() const { return !(left < right && top < bottom); } }; inline bool operator==(const FloatRect& a, const FloatRect& b) { Loading libs/ui/include/ui/StretchEffect.h +2 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <utils/Flattenable.h> #include "FloatRect.h" #include <math.h> #include <type_traits> namespace android { Loading @@ -45,7 +46,7 @@ struct StretchEffect : public LightFlattenablePod<StretchEffect> { void sanitize() { // If the area is empty, or the max amount is zero, then reset back to defaults if (area.bottom >= area.top || area.left >= area.right || isZero(maxAmount)) { if (area.isEmpty() || isZero(maxAmount)) { *this = StretchEffect{}; } } Loading Loading
libs/gui/LayerDebugInfo.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading @@ -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; } Loading @@ -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), Loading
libs/gui/LayerState.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -548,6 +548,10 @@ void layer_state_t::merge(const layer_state_t& other) { what |= eAutoRefreshChanged; autoRefresh = other.autoRefresh; } if (other.what & eStretchChanged) { what |= eStretchChanged; stretchEffect = other.stretchEffect; } if ((other.what & what) != other.what) { ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? " "other.what=0x%" PRIu64 " what=0x%" PRIu64, Loading
libs/gui/include/gui/LayerDebugInfo.h +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <ui/PixelFormat.h> #include <ui/Region.h> #include <ui/StretchEffect.h> #include <string> #include <math/vec4.h> Loading Loading @@ -66,6 +67,7 @@ public: bool mRefreshPending = false; bool mIsOpaque = false; bool mContentDirty = false; StretchEffect mStretchEffect = {}; }; std::string to_string(const LayerDebugInfo& info); Loading
libs/ui/include/ui/FloatRect.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: float top = 0.0f; float right = 0.0f; float bottom = 0.0f; constexpr bool isEmpty() const { return !(left < right && top < bottom); } }; inline bool operator==(const FloatRect& a, const FloatRect& b) { Loading
libs/ui/include/ui/StretchEffect.h +2 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <utils/Flattenable.h> #include "FloatRect.h" #include <math.h> #include <type_traits> namespace android { Loading @@ -45,7 +46,7 @@ struct StretchEffect : public LightFlattenablePod<StretchEffect> { void sanitize() { // If the area is empty, or the max amount is zero, then reset back to defaults if (area.bottom >= area.top || area.left >= area.right || isZero(maxAmount)) { if (area.isEmpty() || isZero(maxAmount)) { *this = StretchEffect{}; } } Loading