Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Icons are black and white on Android #1649

Closed

Description

@kkaefer

image

Activity

  1. added
    Android
    on May 27, 2015
  2. ljbade commented on Jun 1, 2015

    @ljbade
    Contributor

    On my Sony Xperia Z3 it is even worse, I just get a white filled shape the same outline as those markers with no black fill.

    Some sort of GL issue?

  3. bleege commented on Jun 1, 2015

    @bleege
    Contributor

    This look similar to #843.

  4. added this to the milestone on Jun 3, 2015
  5. ljbade commented on Jun 3, 2015

    @ljbade
    Contributor

    Did some testing.

    With a red outputting icon.fragment.glsl I get red squares. The actual shader is simple pass through of the texture colour. So it apppears to be either an issue with creating the GL texture or bad texture data.

    It appears the GL code to create and load the SpiteAtlas is OK. Thus it might be the underlying SpriteAtlas data that is wrong.

    I also experimented with hard coding the pixel ratio at https://github.com/mapbox/mapbox-gl-native/blob/master/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java#L139

    With 1.0f, 2.0f, 3.0f, 4.0f the icons load fine.

  6. ljbade commented on Jun 3, 2015

    @ljbade
    Contributor

    Ignore above for the moment

    @kkaefer can you test again with latest master, icons loading fine on my Sony now. Not sure what got changed recently.

  7. tmpsantos commented on Jun 4, 2015

    @tmpsantos
    Contributor

    Funny that I hit something similar on QMapboxGL (on Linux only) that I fixed with a nasty hack:
    https://github.com/tmpsantos/qmapboxgl/blob/master/src/qmapboxgl.cpp#L118-L122

  8. ljbade commented on Jun 4, 2015

    @ljbade
    Contributor

    Perhaps there is a bug in the code that scales sprite data as it gets copied to the sprite atlas

  9. kkaefer commented on Jun 9, 2015

    @kkaefer
    MemberAuthor

    Just checked, this problem still exists with current master.

  10. ljbade commented on Jun 10, 2015

    @ljbade
    Contributor

    Hmm I wonder what is specific to your phone

  11. mb12 commented on Jun 10, 2015

    @mb12

    @kkaefer What is the screen density on your device (Devicemetrics.density)? Android devices can have fractional densities (1.5, 2.5 etc.).

  12. kkaefer commented on Jun 10, 2015

    @kkaefer
    MemberAuthor

    @mb12 it's 2.0

  13. ljbade commented on Jun 15, 2015

    @ljbade
    Contributor

    @kkaefer what happens if you try a suggestion I got to change the spite fragment shader to output red pixels?

  14. mb12 commented on Jun 18, 2015

    @mb12

    @tmpsantos and @kkaefer Were you able to figure out why on linux adding 0.0001 to device density causes icons to show up with regular colors instead of black and white? Is it possible to do the same experiment on the Android device that shows black and white icons?

  15. ljbade commented on Jun 19, 2015

    @ljbade
    Contributor

    I wonder if there is something wrong in the code that scales up sprites from the original image to the size required by the GL texture (which is set based on density) that causes it to not correctly copy the data.

  16. zugaldia commented on Jun 30, 2015

    @zugaldia
    Member

    Just in case it helps, I can see color icons on a Nexus 5 with current master:

    screenshot_2015-06-30-15-02-14

  17. bleege commented on Aug 19, 2015

    @bleege
    Contributor

    I also haven't seen this recently. @kkaefer @ljbade can you 👀 things again on your devices. If things are good we can close this ticket.

  18. bleege commented on Aug 26, 2015

    @bleege
    Contributor

    Haven't seen this recently and no one is talking about it. We also just bumped to V8 styles as of 24-Aug-2015 via 6966add.

  19. kkaefer commented on Sep 15, 2015

    @kkaefer
    MemberAuthor

    I can't reproduce this anymore on my Moto G2.

  20. zugaldia commented on Sep 16, 2015

    @zugaldia
    Member

    Just FYI, the Espresso tests for the test app include now a way to take screenshots of the map that could help track this kind of issue in the future.

    For example, this test switches to the Streets style, and perform two double clicks (to zoom in). Then it takes a screenshot named testMapboxStreetsBlackAndWhite.png. This works on AWS Device Farm, so we could check the resulting screen in dozens of devices automatically.

  21. zugaldia commented on Sep 16, 2015

    @zugaldia
    Member

    Forgot to add, AWS also let's you mock the user location to any lat/lon.

  22. ljbade commented on Sep 16, 2015

    @ljbade
    Contributor

    @zugaldia: Nice, perhaps you can script an image compare test? Then we could add test cases as we find and fix render bugs.

  23. ljbade commented on Sep 16, 2015

    @ljbade
    Contributor

    @zugaldia: Nice, perhaps you can script an image compare test? Then we could add test cases as we find and fix render bugs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions