mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Expand DisplayList layer bounds to whole pixels
Before passing these layers to the paint task, expand them to pixel boundaries. This ensures that subpixel edges of the layer will not be clipped away and helps prevent rounding issues with layer contents. Fixes #8166.
This commit is contained in:
parent
9501564e01
commit
a7a58e47a0
8 changed files with 106 additions and 30 deletions
|
@ -34,7 +34,7 @@ use std::mem as std_mem;
|
|||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, Select, Sender, channel};
|
||||
use url::Url;
|
||||
use util::geometry::ZERO_POINT;
|
||||
use util::geometry::{ExpandToPixelBoundaries, ZERO_POINT};
|
||||
use util::opts;
|
||||
use util::task::spawn_named;
|
||||
use util::task::spawn_named_with_send_on_failure;
|
||||
|
@ -85,7 +85,7 @@ impl PaintLayer {
|
|||
pub fn new_with_display_list(layer_info: LayerInfo,
|
||||
display_list: DisplayList)
|
||||
-> PaintLayer {
|
||||
let bounds = display_list.calculate_bounding_rect();
|
||||
let bounds = display_list.calculate_bounding_rect().expand_to_px_boundaries();
|
||||
PaintLayer {
|
||||
id: layer_info.layer_id,
|
||||
background_color: color::transparent(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue