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

don't scale when adding to sprite atlas - #3530

Merged
ansis merged 2 commits into
masterfrom
sprite-atlas-no-scaling
Jan 13, 2016
Merged

ansis merged 2 commits into
masterfrom
sprite-atlas-no-scaling

Conversation

@ansis

@ansis ansis commented Jan 13, 2016

Copy link
Copy Markdown
Contributor

Don't scale images when adding them to the sprite atlas and make the sprite atlas match -js.

fix #3164 and port https://github.com/mapbox/mapbox-gl-js/pull/1919/files

can you review @jfirebaugh?

@jfirebaugh

Copy link
Copy Markdown
Contributor

Also fixes #3513?

@mb12

mb12 commented Jan 13, 2016

Copy link
Copy Markdown

@ansis Can SpriteAtlas::bind be unconditionally called with linear=true?

@jfirebaugh

Copy link
Copy Markdown
Contributor

What about this scaling code?

@ansis

ansis commented Jan 13, 2016

Copy link
Copy Markdown
Contributor Author

Also fixes #3513?

Yes, except for #3528

@ansis Can SpriteAtlas::bind be unconditionally called with linear=true?

Using nearest neighbour filtering is clearer when icons copied at their original size. This small bit of extra clarity matters since icons are already pretty small.

What about this scaling code?

yeah, that needs to be removed.

@ansis
ansis force-pushed the sprite-atlas-no-scaling branch 2 times, most recently from bd112e4 to fc20199 Compare January 13, 2016 03:34
@ansis

ansis commented Jan 13, 2016

Copy link
Copy Markdown
Contributor Author

The nearest neighbour scaling code is removed in fc20199

@ansis
ansis force-pushed the sprite-atlas-no-scaling branch from fc20199 to 1db89b0 Compare January 13, 2016 19:28
@ansis

ansis commented Jan 13, 2016

Copy link
Copy Markdown
Contributor Author

@jfirebaugh I think this should be good now. Want to take another look?

Comment thread src/mbgl/sprite/sprite_atlas.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh, good catch. I'll remove and add a render test to catch this kind of bug: mapbox/mapbox-gl-test-suite#72

@ansis

ansis commented Jan 13, 2016

Copy link
Copy Markdown
Contributor Author

scaling.hpp is removed in 0930972

the wrapping bug is fixed in e16a487 and covered with a new render test: mapbox/mapbox-gl-test-suite@a7e5668

do you see anything else or can this be squashed and merged (once tests ci passes)?

@jfirebaugh

Copy link
Copy Markdown
Contributor

LGTM

@ansis
ansis force-pushed the sprite-atlas-no-scaling branch from e16a487 to 53d2f53 Compare January 13, 2016 21:54
@ansis
ansis force-pushed the sprite-atlas-no-scaling branch from 53d2f53 to 583ee11 Compare January 13, 2016 22:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

never scale images when copying them into the SpriteAtlas

3 participants