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 #3855

Merged
merged 2 commits into from Feb 10, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Bug 1605283 - Improve support for invalidation debugging and testing …

…r=gw

Fourth iteration: improve the detail in reported tile invalidations.

The invalidation enum stores the old and new values for lightweight
types.  For a change in PrimCount, the old and new list of ItemUids is
stored (if logging is enabled); the tool can then diff the two to see
what was added and removed.  To convert that back into friendly strings,
the interning activity is used to build up a map of ItemUid to a string.

A similar special-casing of Content Descriptor will print the item
that's invalidating the tile, plus the origin and/or rectangle.

Also adding zoom and pan command line options both to fix high-DPI
issues and also to allow zooming out far enough to see out-of-viewport
cache lifetime and prefetching due to scrolling.

Also fix a bug where interning updates get lost if more than one update
happens without building a frame: switch to a vector of serialized
updatelists (one per type) instead of allowing just one string (per
type).

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/813768d074e3accc36dc3313d0bffb658dcc562d
  • Loading branch information
bpeersmoz authored and moz-gfx committed Feb 10, 2020
commit 32876a5dc5aed91baba76b409db7224d4da4f390

Large diffs are not rendered by default.

@@ -13,7 +13,19 @@
background: white;
}

.intern_header {
.datasheet .header {
color: white;
font-family: Arial;
font-weight: bold;
font-size: 150%;
line-height: 200%;
background-color: grey;
margin-top: 15px;
margin-bottom: 5px;
padding-left: 10px;
}

.datasheet .subheader {
color: blue;
font-family: Arial;
font-weight: bold;
@@ -23,26 +35,29 @@
margin-bottom: 5px;
}

.intern_data {
.datasheet .data {
font-family: monospace;
font-size: small;
margin-bottom: 5px;
}

.intern_data .insert:nth-child(even) {
.datasheet .data *:nth-child(even) {
background: #FFFFFF;
}
.intern_data .insert:nth-child(odd) {
.datasheet .data *:nth-child(odd) {
background: #EFEFEF;
}

.intern_data .insert {
color: #008000;
.datasheet .data .insert {
color: #006000;
}

.intern_data .remove {
color: #800000;
.datasheet .data .remove {
color: #600000;
}

.datasheet .data .change {
color: #000060;
}


.split {
@@ -58,7 +73,7 @@

.right {
right: 0;
width: 25%;
width: 30%;
height: 90%;
}

@@ -125,6 +125,7 @@ pub enum UpdateKind {
#[derive(MallocSizeOf)]
pub struct Update {
pub index: usize,
pub uid: ItemUid,
pub kind: UpdateKind,
}

@@ -261,9 +262,12 @@ impl<I: Internable> Interner<I> {
None => self.local_data.len(),
};

let uid = ItemUid::next_uid();

// Add a pending update to insert the new data.
self.updates.push(Update {
index,
uid,
kind: UpdateKind::Insert,
});
self.update_data.alloc().init(data.clone());
@@ -272,7 +276,7 @@ impl<I: Internable> Interner<I> {
let handle = Handle {
index: index as u32,
epoch: self.current_epoch,
uid: ItemUid::next_uid(),
uid,
_marker: PhantomData,
};

@@ -316,6 +320,7 @@ impl<I: Internable> Interner<I> {
free_list.push(handle.index as usize);
updates.push(Update {
index: handle.index as usize,
uid: handle.uid,
kind: UpdateKind::Remove,
});
return false;
@@ -221,6 +221,7 @@ pub use crate::screen_capture::{AsyncScreenshotHandle, RecordedFrameHandle};
pub use crate::shade::{Shaders, WrShaders};
pub use api as webrender_api;
pub use webrender_build::shader::ProgramSourceDigest;
pub use crate::picture::{TileDescriptor, TileId, InvalidationReason, PrimitiveCompareResult};
pub use crate::picture::{TileDescriptor, TileId, InvalidationReason};
pub use crate::picture::{PrimitiveCompareResult, PrimitiveCompareResultDetail, CompareHelperResult};
pub use crate::picture::{TileNode, TileNodeKind, TileSerializer, TileCacheInstanceSerializer, TileOffset, TileCacheLoggerUpdateLists};
pub use crate::intern::{Update,UpdateKind};
pub use crate::intern::{Update, UpdateKind, ItemUid};
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.