Loading libs/hwui/Properties.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ float Properties::defaultSdrWhitePoint = 200.f; bool Properties::useHintManager = true; int Properties::targetCpuTimePercentage = 70; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::Shader; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; bool Properties::load() { bool prevDebugLayersUpdates = debugLayersUpdates; Loading libs/hwui/Properties.h +3 −2 Original line number Diff line number Diff line Loading @@ -200,8 +200,9 @@ enum class OverdrawColorSet { Default = 0, Deuteranomaly }; enum class RenderPipelineType { SkiaGL, SkiaVulkan, NotInitialized = 128 }; enum class StretchEffectBehavior { Shader, LinearScale, ShaderHWUI, // Stretch shader in HWUI only, matrix scale in SF Shader, // Stretch shader in both HWUI and SF LinearScale // Linear stretch everywhere }; /** Loading libs/hwui/jni/android_graphics_RenderNode.cpp +26 −23 Original line number Diff line number Diff line Loading @@ -573,8 +573,9 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, const RenderProperties& props = node.properties(); uirenderer::Rect bounds(props.getWidth(), props.getHeight()); if (Properties::stretchEffectBehavior == StretchEffectBehavior::Shader && info.stretchEffectCount) { bool useStretchShader = Properties::stretchEffectBehavior != StretchEffectBehavior::LinearScale; if (useStretchShader && info.stretchEffectCount) { handleStretchEffect(info, bounds); } Loading Loading @@ -679,6 +680,7 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, stretchTargetBounds(*effect, result.width, result.height, childRelativeBounds,targetBounds); if (Properties::stretchEffectBehavior == StretchEffectBehavior::Shader) { JNIEnv* env = jnienv(); jobject localref = env->NewLocalRef(mWeakRef); Loading @@ -704,6 +706,7 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, #endif env->DeleteLocalRef(localref); } } void doUpdatePositionAsync(jlong frameNumber, jint left, jint top, jint right, jint bottom) { Loading libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ void RenderNodeDrawable::forceDraw(SkCanvas* canvas) const { } static bool stretchNeedsLayer(const LayerProperties& properties) { return Properties::stretchEffectBehavior == StretchEffectBehavior::Shader && return Properties::stretchEffectBehavior != StretchEffectBehavior::LinearScale && !properties.getStretchEffect().isEmpty(); } Loading Loading @@ -253,7 +253,7 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const { const StretchEffect& stretch = properties.layerProperties().getStretchEffect(); if (stretch.isEmpty() || Properties::stretchEffectBehavior != StretchEffectBehavior::Shader) { Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { // If we don't have any stretch effects, issue the filtered // canvas draw calls to make sure we still punch a hole // with the same canvas transformation + clip into the target Loading Loading
libs/hwui/Properties.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ float Properties::defaultSdrWhitePoint = 200.f; bool Properties::useHintManager = true; int Properties::targetCpuTimePercentage = 70; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::Shader; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; bool Properties::load() { bool prevDebugLayersUpdates = debugLayersUpdates; Loading
libs/hwui/Properties.h +3 −2 Original line number Diff line number Diff line Loading @@ -200,8 +200,9 @@ enum class OverdrawColorSet { Default = 0, Deuteranomaly }; enum class RenderPipelineType { SkiaGL, SkiaVulkan, NotInitialized = 128 }; enum class StretchEffectBehavior { Shader, LinearScale, ShaderHWUI, // Stretch shader in HWUI only, matrix scale in SF Shader, // Stretch shader in both HWUI and SF LinearScale // Linear stretch everywhere }; /** Loading
libs/hwui/jni/android_graphics_RenderNode.cpp +26 −23 Original line number Diff line number Diff line Loading @@ -573,8 +573,9 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, const RenderProperties& props = node.properties(); uirenderer::Rect bounds(props.getWidth(), props.getHeight()); if (Properties::stretchEffectBehavior == StretchEffectBehavior::Shader && info.stretchEffectCount) { bool useStretchShader = Properties::stretchEffectBehavior != StretchEffectBehavior::LinearScale; if (useStretchShader && info.stretchEffectCount) { handleStretchEffect(info, bounds); } Loading Loading @@ -679,6 +680,7 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, stretchTargetBounds(*effect, result.width, result.height, childRelativeBounds,targetBounds); if (Properties::stretchEffectBehavior == StretchEffectBehavior::Shader) { JNIEnv* env = jnienv(); jobject localref = env->NewLocalRef(mWeakRef); Loading @@ -704,6 +706,7 @@ static void android_view_RenderNode_requestPositionUpdates(JNIEnv* env, jobject, #endif env->DeleteLocalRef(localref); } } void doUpdatePositionAsync(jlong frameNumber, jint left, jint top, jint right, jint bottom) { Loading
libs/hwui/pipeline/skia/RenderNodeDrawable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ void RenderNodeDrawable::forceDraw(SkCanvas* canvas) const { } static bool stretchNeedsLayer(const LayerProperties& properties) { return Properties::stretchEffectBehavior == StretchEffectBehavior::Shader && return Properties::stretchEffectBehavior != StretchEffectBehavior::LinearScale && !properties.getStretchEffect().isEmpty(); } Loading Loading @@ -253,7 +253,7 @@ void RenderNodeDrawable::drawContent(SkCanvas* canvas) const { const StretchEffect& stretch = properties.layerProperties().getStretchEffect(); if (stretch.isEmpty() || Properties::stretchEffectBehavior != StretchEffectBehavior::Shader) { Properties::stretchEffectBehavior == StretchEffectBehavior::LinearScale) { // If we don't have any stretch effects, issue the filtered // canvas draw calls to make sure we still punch a hole // with the same canvas transformation + clip into the target Loading