зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1674029 - Adjust compositor surface tile dirty rects by their transform if applicable. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D96494
This commit is contained in:
Родитель
f3ff90cc22
Коммит
59ca2a8ce8
|
@ -94,6 +94,7 @@ pub struct CompositeTile {
|
|||
pub clip_rect: DeviceRect,
|
||||
pub dirty_rect: DeviceRect,
|
||||
pub valid_rect: DeviceRect,
|
||||
pub transform: Option<CompositorSurfaceTransform>,
|
||||
pub z_id: ZBufferId,
|
||||
}
|
||||
|
||||
|
@ -569,6 +570,7 @@ impl CompositeState {
|
|||
valid_rect: tile.device_valid_rect.translate(-device_rect.origin.to_vector()),
|
||||
dirty_rect: tile.device_dirty_rect.translate(-device_rect.origin.to_vector()),
|
||||
clip_rect: device_clip_rect,
|
||||
transform: None,
|
||||
z_id: tile.z_id,
|
||||
};
|
||||
|
||||
|
@ -738,6 +740,7 @@ impl CompositeState {
|
|||
valid_rect: external_surface.device_rect.translate(-external_surface.device_rect.origin.to_vector()),
|
||||
dirty_rect: external_surface.device_rect.translate(-external_surface.device_rect.origin.to_vector()),
|
||||
clip_rect,
|
||||
transform: Some(external_surface.transform),
|
||||
z_id: external_surface.z_id,
|
||||
};
|
||||
|
||||
|
|
|
@ -6034,7 +6034,15 @@ impl Renderer {
|
|||
// what the device supports.
|
||||
for tile in composite_state.opaque_tiles.iter().chain(composite_state.alpha_tiles.iter()) {
|
||||
let tile_dirty_rect = tile.dirty_rect.translate(tile.rect.origin.to_vector());
|
||||
combined_dirty_rect = combined_dirty_rect.union(&tile_dirty_rect);
|
||||
let transformed_dirty_rect = if let Some(transform) = tile.transform {
|
||||
transform.outer_transformed_rect(&tile_dirty_rect)
|
||||
} else {
|
||||
Some(tile_dirty_rect)
|
||||
};
|
||||
|
||||
if let Some(dirty_rect) = transformed_dirty_rect {
|
||||
combined_dirty_rect = combined_dirty_rect.union(&dirty_rect);
|
||||
}
|
||||
}
|
||||
|
||||
let combined_dirty_rect = combined_dirty_rect.round();
|
||||
|
|
Загрузка…
Ссылка в новой задаче