Bug 1514744 - Update webrender to commit 3a4ce4b66a7bc9bd10773744d20530c609a61e90 (WR PR #3424). r=kats

https://github.com/servo/webrender/pull/3424

Differential Revision: https://phabricator.services.mozilla.com/D14743

--HG--
extra : moz-landing-system : lando
This commit is contained in:
WR Updater Bot 2018-12-17 16:04:50 +00:00
parent a527f95cbd
commit e3ae63b02e
4 changed files with 34 additions and 10 deletions

View File

@ -1 +1 @@
ac6114d8198f90c7a7be40b80c5bd6f302a1bf4a
3a4ce4b66a7bc9bd10773744d20530c609a61e90

View File

@ -490,8 +490,9 @@ impl FrameBuilder {
&mut z_generator,
);
if let RenderPassKind::OffScreen { ref texture_cache, .. } = pass.kind {
if let RenderPassKind::OffScreen { ref texture_cache, ref color, .. } = pass.kind {
has_texture_cache_tasks |= !texture_cache.is_empty();
has_texture_cache_tasks |= color.must_be_drawn();
}
}

View File

@ -732,13 +732,23 @@ impl TileCache {
let prim_data = &resources.as_common_data(&prim_instance);
let prim_rect = LayoutRect::new(
prim_instance.prim_origin,
prim_data.prim_size,
);
let clip_rect = prim_data
.prim_relative_clip_rect
.translate(&prim_instance.prim_origin.to_vector());
let (prim_rect, clip_rect) = match prim_instance.kind {
PrimitiveInstanceKind::Picture { pic_index, .. } => {
let pic = &pictures[pic_index.0];
(pic.local_rect, LayoutRect::max_rect())
}
_ => {
let prim_rect = LayoutRect::new(
prim_instance.prim_origin,
prim_data.prim_size,
);
let clip_rect = prim_data
.prim_relative_clip_rect
.translate(&prim_instance.prim_origin.to_vector());
(prim_rect, clip_rect)
}
};
// Map the primitive local rect into the picture space.
// TODO(gw): We should maybe store this in the primitive template
@ -850,7 +860,7 @@ impl TileCache {
// We only care about clip nodes that have transforms that are children
// of the surface, since clips that are positioned by parents will be
// handled by the clip collector when these tiles are composited.
if clip_chain_node.spatial_node_index > surface_spatial_node_index {
if clip_chain_node.spatial_node_index >= surface_spatial_node_index {
clip_chain_spatial_nodes.push(clip_chain_node.spatial_node_index);
clip_chain_uids.push(clip_chain_node.handle.uid());
}

View File

@ -110,6 +110,7 @@ pub trait RenderTarget {
);
fn needs_depth(&self) -> bool;
fn must_be_drawn(&self) -> bool;
fn used_rect(&self) -> DeviceIntRect;
fn add_used(&mut self, rect: DeviceIntRect);
@ -258,6 +259,10 @@ impl<T: RenderTarget> RenderTargetList<T> {
self.targets.iter().any(|target| target.needs_depth())
}
pub fn must_be_drawn(&self) -> bool {
self.targets.iter().any(|target| target.must_be_drawn())
}
pub fn check_ready(&self, t: &Texture) {
let dimensions = t.get_dimensions();
assert!(dimensions.width >= self.max_dynamic_size.width);
@ -544,6 +549,10 @@ impl RenderTarget for ColorRenderTarget {
}
}
fn must_be_drawn(&self) -> bool {
!self.tile_blits.is_empty()
}
fn needs_depth(&self) -> bool {
self.alpha_batch_containers.iter().any(|ab| {
!ab.opaque_batches.is_empty()
@ -674,6 +683,10 @@ impl RenderTarget for AlphaRenderTarget {
false
}
fn must_be_drawn(&self) -> bool {
false
}
fn used_rect(&self) -> DeviceIntRect {
self.used_rect
}