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 upAutomatic tile removal #591
Merged
Conversation
| pub fn new(x: uint, y: uint, width: uint, height: uint, tile_size: uint) -> Quadtree<T> { | ||
| /// Takes in the initial width and height of the space, a maximum tile size, and | ||
| /// a maximum amount of memory. Tiles will be deleted if this memory is exceeded. | ||
| /// Set max_mem to 0 to turn off automatic tile removal. |
This comment has been minimized.
This comment has been minimized.
pcwalton
Jul 16, 2013
Contributor
I think I might prefer Option<uint>... it makes it easier to avoid forgetting the check against zero.
src/components/msg/compositor_msg.rs
Outdated
| /// The interface used by the quadtree to get info about LayerBuffers | ||
| pub trait Tile { | ||
| /// Returns the amount of memory used by the tile | ||
| fn get_size(&self) -> uint; |
This comment has been minimized.
This comment has been minimized.
| /// a bool that is true if the child has no tiles and needs to be deleted, and an integer showing the | ||
| /// amount of memory changed by the operation. Unfortunately, the tile has to be an option, because | ||
| /// there are occasionally leaves without tiles. However, the option will always be Some as long as | ||
| /// the quadtree is not empty. |
This comment has been minimized.
This comment has been minimized.
| @@ -171,7 +193,8 @@ impl<T> QuadtreeNode<T> { | |||
|
|
|||
| /// Add a tile associated with a given position in page coords. If the tile size exceeds the maximum, | |||
| /// the node will be split and the method will recurse until the tile size is within limits. | |||
| fn add_tile(&mut self, x: f32, y: f32, tile: T, tile_size: f32) { | |||
| /// Returns an int that represents change in tile memory. | |||
This comment has been minimized.
This comment has been minimized.
pcwalton
Jul 16, 2013
Contributor
I might say "returns the difference in tile memory between the new quadtree node and old quadtree node"
| /// and a redisplay boolean. See QuadTree function description for more details. | ||
| fn get_tile_rects(&mut self, window: Rect<f32>, valid: &fn(&T) -> bool, scale: f32, tile_size: f32) -> | ||
| (~[BufferRequest], bool) { | ||
| /// Also returns an int that represents change in tile memory. |
This comment has been minimized.
This comment has been minimized.
pcwalton
Jul 16, 2013
Contributor
I'm confused, why would getting the tile rect change the tile memory?
bors-servo
pushed a commit
that referenced
this pull request
Jul 17, 2013
The quadtree is now initialized with a memory limit, and tiles are deleted automatically if that limit is exceeded. The memory limit can also be set to None to prevent this behavior.
This comment has been minimized.
This comment has been minimized.
pcwalton
commented on 5468885
Jul 17, 2013
|
r+ |
This comment has been minimized.
This comment has been minimized.
|
saw approval from pcwalton |
This comment has been minimized.
This comment has been minimized.
|
merging eschweic/servo/del-tiles = 5468885 into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = c17ede3 |
This comment has been minimized.
This comment has been minimized.
aydinkim
replied
Jul 29, 2013
|
As I tested this commit, It may exists some memory leakage at the time of tile removal. |
This comment has been minimized.
This comment has been minimized.
eschweic
replied
Jul 29, 2013
|
@aydinkim Textures seem to be deleting correctly according to the OpenGL Profiler. Where do you see the leak? |
bors-servo
pushed a commit
that referenced
this pull request
Jul 17, 2013
The quadtree is now initialized with a memory limit, and tiles are deleted automatically if that limit is exceeded. The memory limit can also be set to None to prevent this behavior.
5468885
into
servo:master
1 check passed
1 check passed
default
all tests passed
ChrisParis
pushed a commit
to ChrisParis/servo
that referenced
this pull request
Sep 7, 2014
Wrong order for some nodes unrelated to shadow dom
glennw
pushed a commit
to glennw/servo
that referenced
this pull request
Jan 16, 2017
Add specific shaders for rectangles with CLIP feature. Having the base rectangle shader include clip makes the software mesa implementation (somewhat) slower for reftests. This is enough of a timing difference that it triggers a lot of intermittent test failures in Servo. Instead, include a simple rectangle shader for workloads that don't have a clip mask. The other shaders are typically more expensive and not used as frequently by the reftests, so hopefully this change is enough to work around the Servo intermittent bugs. <!-- 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/591) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
eschweic commentedJul 16, 2013
The quadtree is now initialized with a memory limit, and tiles are deleted automatically if that limit is exceeded. The memory limit can also be set to None to prevent this behavior.