mirror of
https://github.com/servo/servo.git
synced 2026-05-01 07:14:51 +02:00
Page:
Workweek graphics stack
Pages
Adding a new WebIDL binding
Alternative Logo Proposals and Related Swag
Asynchronous WebAssembly compilation project
Austin Oxidation
Autogeneration of style structs
Basic SVG support project
Beginner's guide to rebasing and squashing
Benchmarking
Benchmarks
Bots
Browser Engine Research
Build Errors FAQ
Buildbot administration
Building for Android
Building for Magic Leap
Building for UWP
Building on ARM desktop Linux
Building
CI Services we use
CSS parse error reporting
CSSOM student project
Canvas rendering project
Cargo upgrade service project
Code rust concurrency
Code Review
Code of Conduct
Coding standards
Compiler upgrade recipes
Compositor Layer Design
Contributing
Control Servo using WebDriver
Creating and viewing WARC web archives in Servo
Creating new OpenSSL Windows binary distributions
Cross compiling from linux to mac
Crowbot
Css selector matching meeting 2013 07 19
DOM Design
DOM documentation
DOM missing pieces
Debugging JS web compat issues
Debugging and editing tools
Debugging
Design
Developer tools student project
Devtools CSS errors
Devtools plans
Devtools
Diagnosing SpiderMonkey JIT issues
Eric Atkinson visit 2013 09 10
Events and sundry
Expand HTTP request response monitoring
Fetch improvement project
Firefox Reality release notes
FirefoxReality build
Firewall setup for servo master1
Focus student project
Form validation student project
GSoC project brainstorming
Garbage collected DOM
Getting started with layout
GitHub Labels
Github & Critic PR handling 101
Github workflow
Glossary
Governance
Graphics toolkit integration
HTML parser improvement project
HTMLElement binding conversion
HTTP archive support project
HTTP library requirements
Hawaii Rooting
High priority content for layout
Highfive
HoloLens 2 test plan
Home
How to generate GStreamer binaries for CI
Image load conformance student project
Image maps project
Implement HTML charset parsing project
Implement ImageBitmap project
Implement missing WebAudio automation student project
Implement support for missing XMLHttpRequest APIs
Implement worker modules
Implementing a web standard (RGSoC)
Improve specification conformance of unicode bidi library
Incremental flow tree construction
Infrastructure
Integrate xml5ever
Intern project brainstorming
Intern projects
JS objects, wrappers, and cross origin concerns 2013 08 07
Layout 2020
Layout Overview
Layout resources
Layout revamp ideas
Leo meyerovich visit 2013 07 22
Linux sandboxing
London Oxidation
London Security
Meeting 2014 10 27
Meeting 2014 12 08
Meeting 2012 02 08
Meeting 2012 02 16
Meeting 2012 07 20
Meeting 2013 04 01
Meeting 2013 04 15
Meeting 2013 04 22
Meeting 2013 04 29
Meeting 2013 05 06
Meeting 2013 05 13
Meeting 2013 05 20
Meeting 2013 06 03
Meeting 2013 06 10
Meeting 2013 06 14
Meeting 2013 06 17
Meeting 2013 06 24
Meeting 2013 07 01
Meeting 2013 07 15
Meeting 2013 07 22
Meeting 2013 07 29
Meeting 2013 08 05
Meeting 2013 08 12
Meeting 2013 08 19
Meeting 2013 09 09
Meeting 2013 09 16
Meeting 2013 09 23
Meeting 2013 09 30
Meeting 2013 10 14
Meeting 2013 10 21
Meeting 2013 10 28
Meeting 2013 11 04
Meeting 2013 11 18
Meeting 2013 11 25
Meeting 2013 12 02
Meeting 2013 12 09
Meeting 2013 12 16
Meeting 2014 01 06
Meeting 2014 01 13
Meeting 2014 01 21
Meeting 2014 01 27
Meeting 2014 02 03
Meeting 2014 02 10
Meeting 2014 02 24
Meeting 2014 03 10
Meeting 2014 03 17
Meeting 2014 03 24
Meeting 2014 03 31
Meeting 2014 04 07
Meeting 2014 04 14
Meeting 2014 04 21
Meeting 2014 04 28
Meeting 2014 05 05
Meeting 2014 05 13
Meeting 2014 05 19
Meeting 2014 06 09
Meeting 2014 06 17
Meeting 2014 06 23
Meeting 2014 06 30
Meeting 2014 07 07
Meeting 2014 07 14
Meeting 2014 07 21
Meeting 2014 07 29
Meeting 2014 08 04
Meeting 2014 08 11
Meeting 2014 08 12
Meeting 2014 08 18
Meeting 2014 08 25
Meeting 2014 09 08
Meeting 2014 09 15
Meeting 2014 09 22
Meeting 2014 09 29
Meeting 2014 10 06
Meeting 2014 10 13
Meeting 2014 10 20
Meeting 2014 11 10
Meeting 2014 11 17
Meeting 2014 11 24
Meeting 2014 12 15
Meeting 2015 01 05
Meeting 2015 01 12
Meeting 2015 01 26
Meeting 2015 02 09
Meeting 2015 02 23
Meeting 2015 03 02
Meeting 2015 03 16
Meeting 2015 03 30
Meeting 2015 04 06
Meeting 2015 04 13
Meeting 2015 04 27
Meeting 2015 05 04
Meeting 2015 05 11
Meeting 2015 05 18
Meeting 2015 06 01
Meeting 2015 06 08
Meeting 2015 06 15
Meeting 2015 07 06
Meeting 2015 07 13
Meeting 2015 07 27
Meeting 2015 08 10
Meeting 2015 08 17
Meeting 2015 08 24
Meeting 2015 08 31
Meeting 2015 09 14
Meeting 2015 09 21
Meeting 2015 09 28
Meeting 2015 10 05
Meeting 2015 10 12
Meeting 2015 10 19
Meeting 2015 10 26
Meeting 2015 11 02
Meeting 2015 11 09
Meeting 2015 11 16
Meeting 2015 11 30
Meeting 2016 01 04
Meeting 2016 01 11
Meeting 2016 01 25
Meeting 2016 02 01
Meeting 2016 02 08
Meeting 2016 02 22
Meeting 2016 03 07
Meeting 2016 03 21
Meeting Devtools Servo 2
Meetings
Microdata project
Minutes Hackathon 2012 03 27
Missing DOM features project
More ServiceWorker support project
More developer tools student project
Mozlandia Automation
Mozlandia B2S
Mozlandia JS
Mozlandia Rust In Gecko
Mozlandia WPT
Mozlandia gfx
Mozlando Devtools Servo
Mozlando Oxidation
Mozlando SM Servo
Mozlando Servo Bluetooth
Mozlando Servo MagicDOM
Mozlando Servo SMStrings
Mutation observer project
Mutation testing project
NCSU student projects
Network security project
Off main thread HTML parsing project
Offscreen canvas improvements project
Offscreen canvas project
Orlando Oxidation 2018
Oxidation 2015 11 05
Persistent sessions student project
Preparing ARM libraries for CI
Priority of CSS properties
Priority of DOM implementation
Priority of dom bindings
Private browsing student project
Profiling
Project proposal deadlines
Prototype JS form controls student project
Prototype ways of splitting the script crate
Publishing a new ANGLE NuGet version
Publishing a new app store release
Push vs Pull for caching
Random web content project
Refactor GLES2 student project
Refactor bluetooth support student project
Remaining work
Removing push notifications from IRC hooks
Replace C libraries student project
Report new contributors project
Representation of computed style
Research
Reviewer
Roadmap
Running Web Platform Tests on Servo
Rust HTML parser
Rust SpiderMonkey debugger API
Rust cssparser code walk 2013 08 02
SaltStack Administration
San Francisco Oxidation
Servo Benchmarking Report (December 2024)
Servo Benchmarking Report (November 2024)
Servo Benchmarking Report (October 2024)
Servo Layout Engines Report
Servo and SpiderMonkey Report
Servo for Gecko Developers
Specification Links
SpiderMonkey related tasks
SpiderMonkey infodump
SpiderMonkey upgrade details
Storage student project
Streaming webassembly student project
Strings
Student project brainstorm
Student projects
Styling overview
Stylo hacking guide
Summer of Code 2014: Implement XMLHttpRequest
Summer of Code 2016: Fetch API
Summer of Code 2016: File support
Summer of Code 2016: ServiceWorker infrastructure
Summer of Code projects
Summit meeting 2013 09 09
Support WebDriver based tests project
Syncing web platform tests (WPT)
TaskCluster
Testing
Tools
Tracking intermittent failures over time project
Transcription Notes from Servo Architecture talk in Suwon
Transcription notes from rust patterns talk in suwon
Transcription parallelism
Transcription rust concurrency
Transcription rust runtime
Transription layout and acid2
Trinity College Dublin student projects
UPenn student projects
Updating the Rust compiler used by Servo
Upgrading non taskcluster linux CI machines
Upgrading the UWP gstreamer binaries
Upgrading the windows LLVM binaries
Upgrading wptrunner
Using DOM types
Using Rust Spidermonkey Prototype
Using WebWorker Prototype
Version 0.1
Videos and presentations
WebAudio JS interfaces student project
WebAudio nodes student project
WebCompatBug
WebSocket student project
Webdriver student project
Webdriver tests student project
Webrender Overview
Whistler 2019 notes
Whistler Bugzilla
Whistler FFOS
Whistler GFX
Whistler Houdini1
Whistler Houdini2
Whistler Necko
Whistler Oxidation 2019
Work items for new contributors
Workweek COW DOM
Workweek alt js
Workweek android arm
Workweek boot 2 servo
Workweek compiler lints
Workweek displaylist
Workweek dogfooding
Workweek encoding
Workweek generated content
Workweek governance
Workweek graphics stack
Workweek graphics toolkit
Workweek incremental layout
Workweek js bindings status
Workweek layers
Workweek layers2
Workweek pixels
Workweek rasterization
Workweek reftests
Workweek roadmap
Workweek script crate
Workweek security
Workweek string interning
Workweek tables
Workweek writing modes
XML parser student project
infra triage notes
jQuery status
webxr.today support
No results
2
Workweek graphics stack
Josh Matthews edited this page 2014-07-07 17:49:31 -07:00
SDL + graphics stack real talk
- jack: should we ditch glut/glfw for egl, sdl, or something of its nature? also, should we implement bas' idea of a new API for browsers?
- pcwalton: no thoughts beyond the mailing thread.
- jack: context is samsung wants to ditch azure dependency, and bas discussed this new API built directly on openGL and would be really fast.
- zwarich: until you add svg.
- jack: problem with gecko is that it draws so many different things, it's a multi-year project. we could bring up a new graphics library without too much extra effort if it's small.
- pcwalton: worried about scope creep. if someone on the graphics team wants to do it, adding it for servo would be really nice. not only because we don't draw as much, but also because we do display lists per node. gecko builds a display list, throws it away, lots of recursive calls that don't relate to dom tree - for parallelism, servo's way is lots of display items that are merged as progress up the tree. in theory we could retain display list items from layout to layout. bas was saying that retaining items can retain gpu items they correspond to, which is very nice. text could retain cached texture atlast for glyphs for fonts, could have items retain gpu state. when coupled with incremental reflow, can know when font is no longer needed and can trash gpu resource. with imm. mode api like skiagl, can't do that and need cache of most recently used fonts. with retained mode api like bas' idea (and cached display items), we could have more precise information about what items need to be stored on gpu. much easier to do on servo. blink is thinking about doing it with skiapicture-per-element due to stacking contexts.
- jack: we have really heavyweight library we're not using much of, designed around single-threaded rendering which already causes problems for us.
- pcwalton: would like to switch to cpu rendering by default. good PR, download, install, be happy.
- zwarich: big problem of gpu-backed 2d renderer is all bugs for glteximage2d - typical text rendering is mosaic of chunks of larger texture. right way to do it is uniform grid of 32x32. for each glyph, if it's over the box size, split it up. if you implement it that way using teximage2d, performance problems on mobile. none of the extensions to make it good are standardized. interested in what azure or skia are doing on linux.
- SimonSapin: There was an article about how Android's font renderer does GPU rendering: https://medium.com/on-coding/androids-font-renderer-c368bbde87d9
- jack: remember, samsung driving this discussion talking about deploying on specialized hardware under their control.
- zwarich: at a hardware level, this problem shouldn't exist. (something about cache flushing having no impact). most drivers try to get state back into state for immediate rendering, will flush cache on every texture render(?). purely problem caused by opengl's interface. might be better if can fill up a texture and not use teximage2d, need fallback path to do what current renderers are doing. don't know how to do that in a platform-independent way.
- pcwalton: on android there's surfacetexture, but there's also android fragmentation. these are arguments against gpu in general. lots of gfx team gung-ho about gpu rendering. we should do cpu-rendering by default. if you have control over the hardware you're in a better position. orthogonal to creating a new graphics API - don't feel we have the resources to do this. I would strongly push the gfx team to experiment with servo first. could write the library in rust! question about canvas and SVG - canvas needs to be immediate mode API regardless, since the API is immediate mode, so you need to use azure or something.
- zwarich: tangent was just one aspect of writing graphics library. just that one problem is a hard one. writing a new (??) wouldn't be too terrible, and would be faster than what we're currently doing.
- pcwalton: could switch to cpu rendering and use all cores.
- brson: preference for distributing work for painting?
- pcwalton: spawn a task per tile. could cache tasks, but surprising if it matters.
- jack: send message with index of tile and pointer to display list?
- pcwalton: yes
- zwarich: if running on a GPU, already doing heavy-weight synchronization. spawning tasks shouldn't be comparable.
- pcwalton: (gfx technobabble)
- zwarich: on many platforms doesn't make sense to render on multiple threads since just takes locks in the driver.
- pcwalton: bas' problem with the atlas is due to immediate mode API, don't know whether to get rid of it, so use heuristics. whereas we know what's on the page, but can't tell skia about it. we can do better if we hold on to gpu resources via retained api.
- gw: with some knowledge don't have to build atlas per thread. you can share them.
- kmc: save on gpu memory
- gw: when rendering on 1080p will be blown away by gpu
- kmc: re: gpu scheduling being disaster, could work with vendors and talk about using servo as good demo for improvements.
- pcwalton: I want to be able to reserve cores.
- kmc: talk to amd and nvidia about this, probably have contacts.
- pcwalton: should try coregraphics accelerated on mac, should be better than skia. apparently safari is shipping that today.
- mbrubeck: firefox uses azure with direct2d/3d backends on windows. there's a reason we ended up with azure.
- jack: andreas thinks we should use ANGLE. we need it for webgl eventually anyway.
Graphics stack (several days later, with special guest Martin Robinson)
- jack: You're working on overflow next: how is that going?
- martin: As working on test cases for overflow, I found compositor and flowtree bugs. The two I was looking at this week are just related to reflow. I fixed those, and the test case I made (third bug) is the overflow bug. Once I figure out that (which is probably another reflow bug), I will start looking at displayport and then culling the display lists. This has been good because it helped me figure out how reflow works and how absolutely positioned elements work.
- pcwalton: I've added some code. Hopefully will land incremental reflow this work.Also added the beginning of a display list optimization pass. Although, your work will be on a different level because there's display list optimization on it, but also display port optimization that avoids creating the display list items in the first place.
- martin: Now for fixed pos elements, it looks like overflow is calculated as if the display port is at 0,0. Does that seem correct?
- pcwalton: For fixed position elements, they get a separate layer, so you can use 0,0 and it should be fine... maybe check via mail to the mailing list on what to do there so we can ask roc and/or bz? I don't know what the right thing to do with position:fixed is off the top of my head.
- pcwalton: I think you're going to always want to render all position:fixed things and never cull them out. So, how do we know to descend into elements that contained fixed position things. Maybe we should just have a list of them on the root, since that's their containing block anyway and always go into the unconditionally. You want to descend into containing block that intersect with the viewport. In this case, it's the root, so you'll always want to.
- martin: In addition to abs_descendents...
- pcwalton: Yes, fixed_descendents
- martin: The bug was with fixed & abs positioned. When static, they're still relative to their containing block. The idea you proposed sounds good for display lists creation.
- jack: Other topics? In layers refactoring?
- pcwalton: We figured out why rendering is so slow, at least in CPU rendering mode. The problem is that skia wasn't clipping well, so now we do it in a display list optimization. The upshot of that is that we don't have to worry about performance too much now in the refactoring. What's not good is maintainability, so we should focus on that - clarity, etc. Our perf is OK now with the current design, which is good because it's one less thing to worry about. At some point, I will try to look into why we're so racy when uploading textures and try to solve that. Well, maybe, if I have time...
- jack: Other thing was SDL vs. EFL stuff. Best thing to do long-term there? cameron mentioned concerns with SDL as the wrong way to go.
- pcwalton: Shouldn't use SDL and just use a better set of code. It's only a few hundred lines of opengl code. But SDL may be a reasonable choice for setting up things.
- czwarich: I just don't want to use SDL for the layers. For Windowing... it's better than glfw.
- larsberg: I was in favor of EFL because of DRM support built-in (for cross process texture sharing on Wayland, etc.) and because zmike offered to do the work for it.
- pcwalton: If it can do cross-process texture sharing on Linux then that's an advantage over everything else.
- larsberg: zmike says that already landed and supports Windows also.
- mrobinson: Doesn't Ozone have support for cross-process surface sharing?
- mrobinson: http://www.chromium.org/developers/design-documents/ozone
- larsberg: Has DRM support for cross-process texture landed?
- zmike: Yes, and wayland support has been in for 2 years now.
- pcwalton: It can do cross-process texture sharing on linux, right?
- zmike: DRM, yes, though no way other than that.
- pcwalton: I don't think there's anything other than that...
- czwarich: Mac, too? Or linux only?
- zmike: I believe it's linux-only...
- pcwalton: we have code for Mac
- martin: DRM is intel but not nvidia or amd, right?
- pcwalton: I think nvidia is hopeless anyway.
- martin: Should be possible with the x composite extension... and in wayland, you can make an embedded compositor. Not as flexible as DRM, but works in webkit.
- pcwalton: Haven't tried x composite extension before, but it should work.
- martin: What's the problem with texfrompixmap right now?
- pcwalton: Ideally, I really want the content process to have no connetion to x server at all. Reason is that X is super insecure and that's bad for an untrusted content process. DRM works well for this b/c for DRI3, it's reasonably secure. But if you have to have a connection to the x server, you don't have a lot of security with that content process anyway. On nvidia, I don't know of anything other than having a texture shared via x. Maybe don't be multi-process on nvidia?
- martin: wayland is a bit easier because you can use embedded wayland compositors
- pcwalton: Not as scared of having a wayland client as an x client. On linux, we use DRM where available for multi-process servo. If you have nvidia blob, single-process servo.
- martin: rasterization to compositor?
- pcwalton: Could try to IPC them to the display lists, but that's a lot of overhead. No other browser has tried to do that. Maybe wiregl in chromium... but that's kind of at a different level. I just don't want to do a ton of work in the design jsut for nvidia blob on linux. Seems uninteresting for Servo right now.
- martin: Chromium is moving to this model (impl-side painting). Main reason is so they can do eager painting of exposed regions.
- pcwalton: We can already do that because the render task is in a separate thread. I'm very curious what that will do to chromium's perf... seems like a big hit.
- czwarich: Complicates caching.
- pcwalton: So skia pictures over the wire?
- martin: Yes. Skia pictures.
- pcwalton: Seems like a lot of overhead. By contract, our display lists are just a pointer and one atomic operation.
- larsberg: I also asked zmike about the footprint of EFL, and he says based on Samsung's metrics it has a smaller footprint than SDL and other frameworks, and doesn't depend on the rest of Enlightenment.
- pcwalton: Also fears about impl-side painting - security!
- czwarich: Wouldn't want to do it unless it was written in rust.
- pcwalton: Yeah, moving skia into the sandboxed process seems dangerous
- martin: Might just be in the compositor thread and not in the gpu process (unless you're in the opengl version because of the driver).
- pcwalton: Nothing else to chat about. Let's investigate efl!
- jack: If we use EFL, does that affect embedding? Do apps that embed Servo need to use EFL too?
- larsberg: We'll have to ask zmike.
- jack: Specifically, if we want to make a ServoView component... that's my only remaining question.
- acavalcanti: EFL is really modular. Can probably select a smaller selection of the libraries.
- jack: the question is: can we create a GTK servo view widget, does it hide the EFL details?
- acavalcanti: Are you just using EFL to replace Skia for rasterization? Or for other stuff?
- jack: Just replace what glut/glfw are doing. Open window, get a framebuffer... basic mouse/keyboard events. That's about it.
- acavalcanti: It should be possible to do what you want as far as I can tell.
- jack: Experimentation is needed. glfw certainly has the same issues, at the very least.
- bjz: Which issues?
- jack: doesn't work on android
- bjz: Yeah, that's the annoying thing. SDL has much better Android support.
- jack: Viewport-only display lists? Only thing left.
- pcwalton: Yeah, already did, unless there's something specific.
- jack: Guess that's it then, thanks!