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

Robust TransformRect #1426

Merged
merged 2 commits into from Jun 23, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

More debug logging to FrameBuilder

  • Loading branch information
kvark committed Jun 23, 2017
commit 65a9ddd0ae02ac054a46eefda8a47180e04d1a86
@@ -1342,6 +1342,7 @@ impl FrameBuilder {
let group_index = self.stacking_context_store[stacking_context_index.0]
.clip_scroll_group(clip_and_scroll);
if self.clip_scroll_group_store[group_index.0].screen_bounding_rect.is_none() {
debug!("\tcs-group {:?} screen rect is None", group_index);
continue
}

@@ -1532,6 +1533,7 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
self.recalculate_clip_scroll_groups();
self.compute_stacking_context_visibility();

debug!("processing commands...");
let commands = mem::replace(&mut self.frame_builder.cmds, Vec::new());
for cmd in &commands {
match *cmd {
@@ -1605,6 +1607,7 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
}

fn recalculate_clip_scroll_groups(&mut self) {
debug!("recalculate_clip_scroll_groups");
for ref mut group in &mut self.frame_builder.clip_scroll_group_store {
let stacking_context_index = group.stacking_context_index;
let stacking_context = &mut self.frame_builder
@@ -1620,6 +1623,8 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
.pre_translate(stacking_context.reference_frame_offset.to_3d());

if !packed_layer.set_transform(transform) || !stacking_context.can_contribute_to_scene() {
debug!("\t{:?} unable to set transform or contribute with {:?}",
stacking_context_index, transform);
return;
}

@@ -1634,6 +1639,9 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
group.screen_bounding_rect = packed_layer.set_rect(&local_viewport_rect,
self.screen_rect,
self.device_pixel_ratio);

debug!("\t{:?} local viewport {:?} screen bound {:?}",
stacking_context_index, local_viewport_rect, group.screen_bounding_rect);
}
}

@@ -1760,6 +1768,7 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
&self.frame_builder.stacking_context_store[stacking_context_index.0];

if !stacking_context.is_visible {
debug!("{:?} of invisible {:?}", base_prim_index, stacking_context_index);
return;
}

@@ -1769,7 +1778,7 @@ impl<'a> LayerRectCalculationAndCullingPass<'a> {
stacking_context.pipeline_id)
};

debug!("\t{:?} at {:?}", base_prim_index, packed_layer_index);
debug!("\t{:?} of {:?} at {:?}", base_prim_index, stacking_context_index, packed_layer_index);
let clip_bounds = match self.rebuild_clip_info_stack_if_necessary(clip_and_scroll.clip_node_id()) {
Some(rect) => rect,
None => return,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.