From 5bbf07e1d5b63a56fbda810d0cbd1d2262e9f42e Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Thu, 29 Jun 2017 11:33:25 +0100 Subject: [PATCH] [TIMOB-24898] Allow background transparency when borderRadius is set --- .../org/appcelerator/titanium/view/TiUIView.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java index 32ecc480440..81a9bcd9811 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java +++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java @@ -873,6 +873,12 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP } else if (key.startsWith(TiC.PROPERTY_BORDER_PREFIX)) { handleBorderProperty(key, newValue); } + + // TIMOB-24898: disable HW acceleration to allow transparency + // when the backgroundColor alpha channel has been set + if ((byte)(bgColor >> 24) < 0xFF) { + disableHWAcceleration(); + } } applyCustomBackground(); @@ -1422,6 +1428,12 @@ private void initializeBorder(KrollDict d, Integer bgColor) } } } + + // TIMOB-24898: disable HW acceleration to allow transparency + // when the backgroundColor alpha channel has been set + if ((byte)(bgColor >> 24) < 0xFF) { + disableHWAcceleration(); + } } }