Add a linear variant of the stretch effect

Supports SurfaceViews & everything

Test: setprop debug.hwui.stretch_mode 1
Bug: 187718492
Change-Id: I9a222fa4c1a40e80a74cdaf75becb9524cbeed9b
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 1cb87be..d06410e 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -171,6 +171,8 @@
  */
 #define PROPERTY_TARGET_CPU_TIME_PERCENTAGE "debug.hwui.target_cpu_time_percent"
 
+#define PROPERTY_STRETCH_EFFECT_TYPE "debug.hwui.stretch_mode"
+
 /**
  * Property for whether this is running in the emulator.
  */
@@ -197,6 +199,11 @@
 
 enum class RenderPipelineType { SkiaGL, SkiaVulkan, NotInitialized = 128 };
 
+enum class StretchEffectBehavior {
+    Shader,
+    LinearScale,
+};
+
 /**
  * Renderthread-only singleton which manages several static rendering properties. Most of these
  * are driven by system properties which are queried once at initialization, and again if init()
@@ -270,6 +277,8 @@
     static bool useHintManager;
     static int targetCpuTimePercentage;
 
+    static StretchEffectBehavior stretchEffectBehavior;
+
 private:
     static ProfileType sProfileType;
     static bool sDisableProfileBars;