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

Use the guillotine algorithm with the rectangle merge improvement for texture atlas allocation. #57

Merged
merged 1 commit into from Oct 24, 2015

Conversation

@pcwalton
Copy link
Collaborator

pcwalton commented Oct 24, 2015

See sections 2.2 and 2.2.5 in "A Thousand Ways to Pack the Bin - A
Practical Approach to Two-Dimensional Rectangle Bin Packing":

http://clb.demon.fi/files/RectangleBinPack.pdf

This approach was chosen because of its simplicity, good performance,
and easy support for dynamic texture deallocation.

Here's a screen shot showing the kind of texture atlases we create with this patch:

screen shot 2015-10-24 at 11 34 08 am

texture atlas allocation.

See sections 2.2 and 2.2.5 in "A Thousand Ways to Pack the Bin - A
Practical Approach to Two-Dimensional Rectangle Bin Packing":

    http://clb.demon.fi/files/RectangleBinPack.pdf

This approach was chosen because of its simplicity, good performance,
and easy support for dynamic texture deallocation.
glennw added a commit that referenced this pull request Oct 24, 2015
Use the guillotine algorithm with the rectangle merge improvement for texture atlas allocation.
@glennw glennw merged commit 5481865 into servo:master Oct 24, 2015
nox pushed a commit to nox/webrender that referenced this pull request Aug 6, 2016
api: Add an api method to deallocate images.

Allows taking rid of some always-growing memory consumption, specially noticeable in 2d canvas.

r? @glennw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.