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

Sync changes from mozilla-central gfx/wr #3859

Merged
merged 4 commits into from Feb 14, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -186,9 +186,11 @@ void main(void) {
#else
float raster_scale = float(ph.user_data.z) / 65535.0;

// Scale in which the glyph is snapped when rasterized.
float glyph_raster_scale = raster_scale * task.device_pixel_scale;

// Scale from glyph space to local space.
float glyph_scale_inv = res.scale / (raster_scale * task.device_pixel_scale);
float glyph_scale = 1.0 / glyph_scale_inv;
float glyph_scale_inv = res.scale / glyph_raster_scale;

// Glyph raster pixels do not include the impact of the transform. Instead it was
// replaced with an identity transform during glyph rasterization. As such only the
@@ -204,7 +206,7 @@ void main(void) {
// - The transform has perspective or does not have a 2d inverse (Screen or local space).
// - The transform's scale will result in result in very large rasterized glyphs and
// we clamped the size. This will imply local raster space.
vec2 raster_glyph_offset = floor(glyph.offset * glyph_scale + snap_bias);
vec2 raster_glyph_offset = floor(glyph.offset * glyph_raster_scale + snap_bias) / res.scale;

// Compute the glyph rect in local space.
//
@@ -304,8 +304,7 @@ impl CompositeState {
) {
let mut visible_tile_count = 0;

for key in &tile_cache.tiles_to_draw {
let tile = &tile_cache.tiles[key];
for tile in tile_cache.tiles.values() {
if !tile.is_visible {
// This can occur when a tile is found to be occluded during frame building.
continue;
@@ -335,8 +334,8 @@ impl CompositeState {
let tile_id = tile_cache.native_surface_id.map(|surface_id| {
NativeTileId {
surface_id,
x: key.x,
y: key.y,
x: tile.tile_offset.x,
y: tile.tile_offset.y,
}
});

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.