summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
diff options
context:
space:
mode:
authorNader Jawad <njawad@google.com>2021-05-10 13:27:52 -0700
committerNader Jawad <njawad@google.com>2021-05-10 16:38:09 -0700
commit9272f2161230ab3fae0051e90131648da55aa0ad (patch)
tree1864f61868f060b320de60f295306f744bf7a133 /libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
parent8ed00dc56d5af7483ed053eb88c550cc1035b029 (diff)
Updated StretchEffect types
Added additional shader stretch effect type to distinguish between shader based stretches that are configured in HWUI as well as those that are configured in both HWUI and SurfaceFlinger Bug: 184297961 Test: manual Change-Id: Ie1083cef7cbaf4f877783d67d429af7f5edd0a3c
Diffstat (limited to 'libs/hwui/pipeline/skia/RenderNodeDrawable.cpp')
-rw-r--r--libs/hwui/pipeline/skia/RenderNodeDrawable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
index 509884e23c26..57cdde2e8f10 100644
--- a/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
+++ b/libs/hwui/pipeline/skia/RenderNodeDrawable.cpp
@@ -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();
}
@@ -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