Loading libs/hwui/DamageAccumulator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ static inline void applyMatrix(const SkMatrix& transform, SkRect* rect) { static inline void mapRect(const RenderProperties& props, const SkRect& in, SkRect* out) { if (in.isEmpty()) return; SkRect temp(in); if (Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { if (Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale) { const StretchEffect& stretch = props.layerProperties().getStretchEffect(); if (!stretch.isEmpty()) { applyMatrix(stretch.makeLinearStretch(props.getWidth(), props.getHeight()), &temp); Loading libs/hwui/Properties.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ bool Properties::load() { if (targetCpuTimePercentage <= 0 || targetCpuTimePercentage > 100) targetCpuTimePercentage = 70; int stretchType = base::GetIntProperty(PROPERTY_STRETCH_EFFECT_TYPE, 0); stretchType = std::clamp(stretchType, 0, static_cast<int>(StretchEffectBehavior::LinearScale)); stretchType = std::clamp(stretchType, 0, static_cast<int>(StretchEffectBehavior::UniformScale)); stretchEffectBehavior = static_cast<StretchEffectBehavior>(stretchType); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); Loading libs/hwui/Properties.h +3 −3 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ enum class RenderPipelineType { SkiaGL, SkiaVulkan, NotInitialized = 128 }; enum class StretchEffectBehavior { ShaderHWUI, // Stretch shader in HWUI only, matrix scale in SF Shader, // Stretch shader in both HWUI and SF LinearScale // Linear stretch everywhere UniformScale // Uniform scale stretch everywhere }; /** Loading libs/hwui/RenderNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -478,7 +478,7 @@ void RenderNode::applyViewPropertyTransforms(mat4& matrix, bool true3dTransform) } } if (Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { if (Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale) { const StretchEffect& stretch = properties().layerProperties().getStretchEffect(); if (!stretch.isEmpty()) { matrix.multiply( Loading libs/hwui/effects/StretchEffect.h +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public: bool requiresLayer() const { return !(isEmpty() || Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale); Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale); } private: Loading Loading
libs/hwui/DamageAccumulator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ static inline void applyMatrix(const SkMatrix& transform, SkRect* rect) { static inline void mapRect(const RenderProperties& props, const SkRect& in, SkRect* out) { if (in.isEmpty()) return; SkRect temp(in); if (Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { if (Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale) { const StretchEffect& stretch = props.layerProperties().getStretchEffect(); if (!stretch.isEmpty()) { applyMatrix(stretch.makeLinearStretch(props.getWidth(), props.getHeight()), &temp); Loading
libs/hwui/Properties.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ bool Properties::load() { if (targetCpuTimePercentage <= 0 || targetCpuTimePercentage > 100) targetCpuTimePercentage = 70; int stretchType = base::GetIntProperty(PROPERTY_STRETCH_EFFECT_TYPE, 0); stretchType = std::clamp(stretchType, 0, static_cast<int>(StretchEffectBehavior::LinearScale)); stretchType = std::clamp(stretchType, 0, static_cast<int>(StretchEffectBehavior::UniformScale)); stretchEffectBehavior = static_cast<StretchEffectBehavior>(stretchType); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); Loading
libs/hwui/Properties.h +3 −3 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ enum class RenderPipelineType { SkiaGL, SkiaVulkan, NotInitialized = 128 }; enum class StretchEffectBehavior { ShaderHWUI, // Stretch shader in HWUI only, matrix scale in SF Shader, // Stretch shader in both HWUI and SF LinearScale // Linear stretch everywhere UniformScale // Uniform scale stretch everywhere }; /** Loading
libs/hwui/RenderNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -478,7 +478,7 @@ void RenderNode::applyViewPropertyTransforms(mat4& matrix, bool true3dTransform) } } if (Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { if (Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale) { const StretchEffect& stretch = properties().layerProperties().getStretchEffect(); if (!stretch.isEmpty()) { matrix.multiply( Loading
libs/hwui/effects/StretchEffect.h +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public: bool requiresLayer() const { return !(isEmpty() || Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale); Properties::stretchEffectBehavior == StretchEffectBehavior::UniformScale); } private: Loading