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

Start using typed units in rust-layers #102

Merged
merged 4 commits into from Aug 27, 2014
Merged

Conversation

@mrobinson
Copy link
Member

mrobinson commented Aug 22, 2014

This allows conversion between unit types which are self-documenting and helps prevent the introduction of errors or confusion about unit types.

@mrobinson mrobinson force-pushed the mrobinson:typed-units branch from 6507931 to 01597c7 Aug 22, 2014
tiling.rs Outdated
@@ -222,15 +233,15 @@ impl TileGrid {
}
}

self.mark_tiles_outside_of_rect_as_unused(rect_in_layer_pixels);
self.mark_tiles_outside_of_rect_as_unused(rect_in_layer);
return buffer_requests;
}

pub fn get_tile_index_for_point(&self, point: Point2D<uint>) -> Point2D<uint> {

This comment has been minimized.

@zwarich

zwarich Aug 25, 2014

Contributor

Should the point parameter here be a typed unit?

This comment has been minimized.

@mrobinson

mrobinson Aug 27, 2014

Author Member

Yeah, eventually when LayerBuffer is using typed units it will make sense to use TypedPoint here. By avoiding a change to the argument now I can do this process all in one commit.

@mrobinson mrobinson force-pushed the mrobinson:typed-units branch from 01597c7 to ae22288 Aug 27, 2014
mrobinson added 4 commits Aug 22, 2014
This will mean that Servo can use rust-layers without ambiguity to the
coordinate system of variables and arguments.
This is the next step in making all units in rust-layers typed.
@mrobinson mrobinson force-pushed the mrobinson:typed-units branch from ae22288 to 353ab26 Aug 27, 2014
zwarich pushed a commit that referenced this pull request Aug 27, 2014
 Start using typed units in rust-layers
@zwarich zwarich merged commit c040299 into servo:master Aug 27, 2014
@mrobinson mrobinson deleted the mrobinson:typed-units branch Sep 8, 2014
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.