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 upSupport resizing items in the texture cache. #1490
Conversation
|
r? @glennw |
|
Nice! A few notes to address. |
| debug_assert_eq!(existing_item.allocated_rect.size.height, descriptor.height); | ||
| self.free_item_rect(existing_item.clone()); | ||
|
|
||
| self.allocate_impl( |
This comment has been minimized.
This comment has been minimized.
kvark
Jul 17, 2017
Member
this would allocate but not really fill it with data we got in the arguments (data), so I think return should be removed
| let existing_item = self.items.get(image_id); | ||
| let existing_item = self.items.get(image_id).clone(); | ||
|
|
||
| if existing_item.allocated_rect.size.width != descriptor.width || |
This comment has been minimized.
This comment has been minimized.
I left the assertion that formats don't change in update_image_template. It's probably easy to add but I would rather do it as a followup.
Oops! That and also I needed to discard the dirty rect when reallocating, and some remaining assertions that had to be removed. Fixed in the next commit which I'll squash whenever the we are done with the reviews. |
|
Looks like everything is good now, thanks! |
|
@bors-servo r+ |
|
|
Support resizing items in the texture cache. I revived #925 to address #1367. TextureCache::update now supports changing the size of the image by freeing and reallocating a rectangle in the cache. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1490) <!-- Reviewable:end -->
|
|
nical commentedJul 17, 2017
•
edited by larsbergstrom
I revived #925 to address #1367.
TextureCache::update now supports changing the size of the image by freeing and reallocating a rectangle in the cache.
This change is