Skip to content

Instantly share code, notes, and snippets.

View WIP.md

% Notes on Type Layouts and ABIs in Rust

Alexis Beingessner

October 9th, 2018 -- Rust Nightly 1.30.0

Over the years I've found myself with a weird amount of knowledge about how types and ABIs in Rust work, and I wanted to write it all down in one place so that... it's written down in one place. Much of this information can or should be found in the [Rust Language Reference][reference] and the [Rustonomicon][nomicon].

Special thanks to Nicole Mazzuca for doing tons of fact-checking on this one!

View rawtraitobjs.md

Raw Trait Objects 1.0

This is the sketch of a proposal for making it possible to manipulate some trait objects in stable rust.

Proposed new/stabilized API:

mod std::raw {
View patch.diff
diff --git a/gfx/webrender/src/glyph_rasterizer/no_pathfinder.rs b/gfx/webrender/src/glyph_rasterizer/no_pathfinder.rs
index abdc2a7736f8..b75ae10cd293 100644
--- a/gfx/webrender/src/glyph_rasterizer/no_pathfinder.rs
+++ b/gfx/webrender/src/glyph_rasterizer/no_pathfinder.rs
@@ -5,7 +5,7 @@
//! Module only available when pathfinder is deactivated when webrender is
//! compiled regularly (i.e. any configuration without feature = "pathfinder")
-use api::{ImageData, ImageDescriptor, ImageFormat};
+use api::{DirtyRect, ImageData, ImageDescriptor, ImageFormat};
View motionmark-in-firefox.md

Properly Running MotionMark On Firefox

TL;DR: to get accurate/useful numbers for MotionMark in Firefox you must set these flags in about:config and restart your browser:

layers.offmainthreadcomposition.frame-rate = 0 (defaults to -1)
privacy.reduceTimerPrecision = false (defaults to true)

The first enables "ASAP mode" which tells the browser to paint frames as much as possible, and the second disables an important Spectre security mitigation that reduces the precision.

View patch.diff
diff --git a/gfx/webrender/src/display_list_flattener.rs b/gfx/webrender/src/display_list_flattener.rs
index 525e79e837e2..3498892e1139 100644
--- a/gfx/webrender/src/display_list_flattener.rs
+++ b/gfx/webrender/src/display_list_flattener.rs
@@ -1029,6 +1029,15 @@ impl<'a> DisplayListFlattener<'a> {
None
};
+ let mut ancestor_is_backface_visible = is_backface_visible;
+ for sc in self.sc_stack.iter().rev() {
View patch.diff
git diff
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
index 683c5d3..2cbd464 100644
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -867,7 +867,7 @@ fuzzy-if(skiaContent,0-2,0-5) == 402629-3.html 402629-3-ref.html
== 403129-3.html 403129-3-ref.html
== 403129-4.html 403129-4-ref.html
random == 403134-1.html 403134-1-ref.html # bug 405377
-== 403181-1.xml 403181-1-ref.xml
View libc.html
<html lang="en">
<head><meta charset="utf-8"></head>
<body>
<main>
<h4>Downloads over the last 90 days</h4>
<div style="height:5400px"></div>
View wr-triage.md

WR triage

Here is a quick explanation of how webrender does triage

Untriaged bugs can be found here.

Triaging a wr bug means setting a priority and marking it as blocking a given stage.

In doubt? Go with "stage-wr-trains P2", since it will probably get retriaged once we're further along.

View mozglue.sym
MODULE windows x86 61D67A008E2F40A78217CEB5E6DB3E131 mozglue.pdb
INFO CODE_ID 5B57751B2A000 mozglue.dll
FILE 1 hg:hg.mozilla.org/mozilla-central:mfbt/Poison.h:54f69f217483467dbd22e02ab4a98d8d8bc0ded8
FILE 2 C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/typeinfo
FILE 3 C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/vcruntime_typeinfo.h
FILE 4 C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt/corecrt_wstdio.h
FILE 5 C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/include/xfacet
FILE 6 C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um/processthreadsapi.h
View raw_entry.rs
use std::collections::hash_map::DefaultHasher;
use std::hash::{BuildHasherDefault, Hasher};
use std::cell::Cell;
// Use `BuildHasherDefault` to get deterministic hashing between map instances
type SimpleMap<K, V> = HashMap<K, V, BuilderHasherDefault<DefaultHasher>>;
/// A very naively memoized string
pub struct MemoizedString {
string: String,
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.