Skip to content

Instantly share code, notes, and snippets.

View WebRenderApi.cpp
void DisplayListBuilder::PushShadow(const wr::LayoutRect& aRect,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::Shadow& aShadow) {
// Local clip_rects are translated inside of shadows, as they are assumed to
// be part of the element drawing itself, and not a parent frame clipping it.
// As such, it is not sound to apply the MergeClipLeaf optimization inside of
// shadows. So we disable the optimization when we encounter a shadow.
// Shadows don't span frames, so we don't have to worry about MergeClipLeaf
// being re-enabled mid-shadow. The optimization is restored in PopAllShadows.
View scene-1-0.rs
(
root_pipeline_id: Some((1, 1)),
pipelines: {
(1, 1): (
pipeline_id: (1, 1),
viewport_size: (2880, 1754),
content_size: (2880, 1754),
background_color: None,
display_list: [
PushStackingContext((
@Gankra
Gankra / OwnershipTLDR.md
Last active Apr 3, 2019
Swift Ownership Manifesto TL;DR
View OwnershipTLDR.md

Swift Ownership Manifesto TL;DR

Most of the manifesto is background and detailed definitions -- if you're confused or want details, read the manifesto!

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170213/032155.html

Note also that manifestos aren't complete proposals -- syntax and details may change!

One piece of background: inout is kinda complicated because it can be used on computed properties -- foo(&val.x) might be sugar for

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 goals.md
  • Help Webrender Ship

    • misc bugfixes that need help
  • Clean up Webrender's DisplayList

    • Understand what semantics are useful/guaranteed
    • Remove redundant/meaningless states
    • Reduce size of display list interprocess copies
  • Update the Rustonomicon to Rust 2018

    • Do a full read-through
View reftest.txt
[task 2019-03-19T04:34:06.169Z] REFTEST reftests/aa/rounded-rects.yaml == reftests/aa/rounded-rects-ref.png
[task 2019-03-19T04:34:06.622Z] REFTEST reftests/aa/aa-dist-bug.yaml == reftests/aa/aa-dist-bug-ref.yaml
[task 2019-03-19T04:34:06.794Z] REFTEST reftests/backface/backface-leaf.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:06.923Z] REFTEST reftests/backface/backface-hidden.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:07.051Z] REFTEST reftests/backface/backface-sc.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:07.180Z] REFTEST reftests/backface/backface-picture.yaml == reftests/backface/backface-picture-ref.yaml
[task 2019-03-19T04:34:07.247Z] REFTEST reftests/backface/backface-double-flip.yaml == reftests/backface/blank.yaml
[task 2019-03-19T04:34:07.287Z] REFTEST reftests/backface/backface-both-sides.yaml == reftests/backface/backface-both-sides-ref.yaml
[task 2019-03-19T04:34:07.336Z] REFTEST reftests/blend/multiply.yaml == reftests/blend/
View reftest.txt
[task 2019-03-19T04:34:06.169Z] REFTEST reftests/aa/rounded-rects.yaml == reftests/aa/rounded-rects-ref.png
[task 2019-03-19T04:34:06.622Z] REFTEST reftests/aa/aa-dist-bug.yaml == reftests/aa/aa-dist-bug-ref.yaml
[task 2019-03-19T04:34:06.794Z] REFTEST reftests/backface/backface-leaf.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:06.923Z] REFTEST reftests/backface/backface-hidden.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:07.051Z] REFTEST reftests/backface/backface-sc.yaml == reftests/backface/backface-ref.yaml
[task 2019-03-19T04:34:07.180Z] REFTEST reftests/backface/backface-picture.yaml == reftests/backface/backface-picture-ref.yaml
[task 2019-03-19T04:34:07.247Z] REFTEST reftests/backface/backface-double-flip.yaml == reftests/backface/blank.yaml
[task 2019-03-19T04:34:07.287Z] REFTEST reftests/backface/backface-both-sides.yaml == reftests/backface/backface-both-sides-ref.yaml
[task 2019-03-19T04:34:07.336Z] REFTEST reftests/blend/multiply.yaml == reftests/blend/
View clip-and-filter-with-rotation.yaml
# Test that filtered content is clipped properly in a rotated context
---
root:
items:
-
bounds: [16, 16, 0, 0]
"clip-rect": [16, 16, 0, 0]
type: "reference-frame"
transform: rotate(10)
id: 7
View gist:4210a2f8da3a9ff980d8f85da15b4770
# Test that filtered content is clipped properly in a rotated context
---
root:
items:
-
bounds: [16, 16, 0, 0]
"clip-rect": [16, 16, 0, 0]
type: "reference-frame"
transform: rotate(10)
id: 7
View scene.rs
(
root_pipeline_id: Some((1, 11)),
pipelines: {
(1, 11): (
pipeline_id: (1, 11),
viewport_size: (2560, 1474),
content_size: (2560, 1474),
background_color: None,
display_list: [
(
You can’t perform that action at this time.