Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse atomic reference counting to store images and avoid copying them. #566
Conversation
|
Rebased on top of the external image stuff. The fact that we still use |
|
r? @glennw |
|
@bors-servo r+ |
|
|
|
@bors-servo r+ retry clean |
|
|
|
|
|
@bors-servo r- |
|
@bors-servo r+ |
|
|
|
@bors-servo r=glennw |
|
|
|
|
nical commentedNov 17, 2016
•
edited by larsbergstrom
We currently clone the bytes of images and glyphs before inserting them in the texture cache, because we need to keep a copy around in case the device is reset or the image is evicted from the cache. We want the images and glyphs to be managed on the backend thread while the buffers need to be read on the renderer thread when they get uploaded.
This PR removes the clone of the bytes by sharing the buffers using atomic reference counting.
This change is