Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24898] Allow background transparency when borderRadius is set #9179

Merged
merged 2 commits into from Jul 6, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Jun 29, 2017

  • Disable canvas hardware-acceleration when a view has a border and background transparency set
TEST CASE
  • Label should be visible before and after clicking the view
var win = Ti.UI.createWindow({title: 'TIMOB-24898', backgroundColor: 'gray'}),
    view = Ti.UI.createView({
        width: 300, height: 300,
        backgroundColor: '#00202020',
        borderRadius: 6, borderWidth: 2,
        borderColor: 'red'
    }),
    lbl = Ti.UI.createLabel({text: 'VISIBLE', color: 'white'});

view.addEventListener('click', function() {
    if (view.backgroundColor.startsWith('#00')) {
        view.backgroundColor = '#AA202020';
    } else {
        view.backgroundColor = '#00202020';
    }
});

win.add(lbl);
win.add(view);
win.open();

JIRA Ticket

@jquick-axway
Copy link
Contributor

jquick-axway commented Jun 29, 2017

Question:
If a border radius triggers this issue, then why does the following not fix this issue?
[link]

@garymathews
Copy link
Contributor Author

garymathews commented Jul 5, 2017

@jquick-axway Yes it would, but not in the case of Jellybean and higher. There's so many edge cases for HW acceleration..

I could increase the bounds of that condition, but I want to keep HW acceleration enabled for the most cases without causing issues.

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Jul 6, 2017

FR Passed.

  1. Checked it with different values of borderRadius
  2. With borderRadius disabled.
  3. With both borderRadius & borderWidth.

Studio Ver: 4.9.0.201705302345
SDK Ver: 6.2.0 local build
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.9
Appc CLI: 6.2.2
Ti CLI Ver: 5.0.14
Alloy Ver: 1.9.11
Node Ver: 6.10.1
Java Ver: 1.8.0_101
Devices: ⇨ google Nexus 5 --- Android 6.0.1
⇨ google Pixel --- Android 7.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants