SlideShare a Scribd company logo
Implementing Threaded
Accelerated Compositing
in WebKit GTK+
Gwang Yoon Hwang

ryumiel@company100.net
www.dorothybrowser.com
Accelerated Compositing
Accelerated Compositing
Compositor

RenderLayer Tree

GraphicsLayer Tree

OpenGL

Display
Current WebKit2 Gtk+
Web Process

UI Process

LayerTreeHostGtk

GraphicsLayerTextureM
apper Tree
TextureMapperLayer
Tree

Cairo Surface
Motivation
The main thread
- Too busy to perform compositing

•  Layout
•  Script
•  DOM
•  Network
•  ...
Off-the-main-thread Compositing
Main Thread

Compositing Thread

Loading
dfsadfMAin

Parsing
Scripting
Styling
Layout

Compositing
Animating
What We Want
Slow Scroll/
Zoom

Fast Scroll/
Zoom

Process User I/O Event

Compositor Thread

Main Thread

WebCompositorInputHandler

Viewport update

Play Cached KeyFrame
Animation

CSS Keyframe
Animation
Layout / CPU
Rasterization

LayerTreeHost

Sync.
Layers

LayerTreeHostProxy

Draw

Rasterized
Layer
Rasterized
Layer
Rasterized
Layer

JavasScript
Execution
Our Requirements

•  Responsiveness
o 

Keep UI responsive at all time

•  Stability
o 

Do not crash UI Process

•  Memory Usage
o 

Conserve GPU memory

•  Maintainability
o 

Share code as much as possible
Several Approaches

•  Core Animation
o 

Mac

•  Chromium Compositor
o 

Chromium

•  Coordinated Graphics System
o 

Qt, EFL
Coordinated Graphics System
RenderLayer Tree

GraphicsLayerTextureM
apper Tree

TextureMapperLayer

CoordinatedGraphicsLa
yer Tree
Texture Mapper

Coordinated Graphics
Coordinated Graphics System
Web Process

CoordinatedLayerTreeHost

UI Process

IPC

CoordinatedLayerTreeHostProxy

LayerTreeRenderer

CoordinatedGraphicsLayer
Tree
TiledBackingStore

GraphicsLayerTextureMapp
er Tree
CoordinatedBackingStore
Coordinated Graphics System

•  Good Things
o 

Memory Usage
§ 

o 

Tiled Backing Store on layers

Maintainability
§ 

Share code as much as possible

•  Restrictions
o 

WebKit2 only

o 

UI Process will be complex

o 

Weak at GPU bugs
Our Implementation

•  Support both WebKit 1 & 2
•  Keep UI Process simple
•  Crash gracefully on GPU bugs
•  Benefits from Coordinated Graphics System
Threaded Compositor for GTK+
Web Process
Main Thread

CoordinatedLayerTreeHost

CoordinatedGraphicsLayer
Tree
TiledBackingStore

Compositing Thread

Message
Queue

LayerTreeRenderer

TextureMapperLayer
Tree
CoordinatedBackingStore

UI
Process
Refactor Coordinated Graphics
Web Process

Web Process

IPC

Main Thread

Compositing Thread

CoordinatedLayerTree

LayerTreeRenderer

Threaded
enqueueCoordinatedOperation(CoordinatedOperation)
commitCoordinatedOperation()
CoordinatedGraphics
Layer

CoordinatedOperation
CreateLayer
DeleteLayer
SetRootLayer
SyncLayerState
SetLayerChildren
...

TextureMapperLayer
Demo
Performance

Intel Core i5-2400@3.10Ghz, Geforce GTS450, Ubuntu 12.04 x86_64
Current Status

•  Design Document
o 

Threaded Coordinated Graphics in GTK+ Port
Design Document

•  Contributing Threaded Compositor to the
WebKit trunk
o 

Master Bug: Bug 100341 - Implement threaded
model of Coordinated Graphics
Thank you!
Q&A
Plan
Step 1. Refactor Coordinated Graphics in
WebKit2 Qt
Step 2. Implement Threaded Coordinated
Graphics in WebKit1 Qt / GTK+
Step 3. Implement Threaded Coordinated
Graphics in WebKit2 GTK+
Refactor Coordinated Graphics

•  Current Pipelines
o  IPC based Coordinated Graphics
o  TextureMapper using GPU
o  TextureMapper using software renderer

•  Unite compositing Pipelines
o 

All ports that use TextureMapper will use
Coordinated Graphics.

More Related Content

What's hot

Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
davrous
 
Taming the cost of your first cloud - CCCEU 2014
Taming the cost of your first cloud - CCCEU 2014Taming the cost of your first cloud - CCCEU 2014
Taming the cost of your first cloud - CCCEU 2014
Tim Mackey
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
Simon Su
 
Fast rendering with starling
Fast rendering with starlingFast rendering with starling
Fast rendering with starling
Flash Conference
 
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Attila Cs. Nagy
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
Nick Dreckshage
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
Yves Goeleven
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overview
Joseph Lust
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App Engine
Simon Su
 
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
NETWAYS
 
Adobe AEM for Business Heads
Adobe AEM for Business HeadsAdobe AEM for Business Heads
Adobe AEM for Business Heads
Yash Mody
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
Stefan Adolf
 
Back to the future with static site generators
Back to the future with static site generatorsBack to the future with static site generators
Back to the future with static site generators
Chris Ward
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
Dor Kalev
 
A holistic approach to web performance
A holistic approach to web performanceA holistic approach to web performance
A holistic approach to web performance
Austin Gil
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mabl
Joseph Lust
 
2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기
iFunFactory Inc.
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Google
Joseph Lust
 

What's hot (20)

Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
 
Taming the cost of your first cloud - CCCEU 2014
Taming the cost of your first cloud - CCCEU 2014Taming the cost of your first cloud - CCCEU 2014
Taming the cost of your first cloud - CCCEU 2014
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
 
Fast rendering with starling
Fast rendering with starlingFast rendering with starling
Fast rendering with starling
 
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
 
nodejs
nodejsnodejs
nodejs
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 
Firebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overviewFirebase Cloud Functions: a quick overview
Firebase Cloud Functions: a quick overview
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App Engine
 
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
 
Adobe AEM for Business Heads
Adobe AEM for Business HeadsAdobe AEM for Business Heads
Adobe AEM for Business Heads
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 
Back to the future with static site generators
Back to the future with static site generatorsBack to the future with static site generators
Back to the future with static site generators
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
Sergejus Barinovas
Sergejus BarinovasSergejus Barinovas
Sergejus Barinovas
 
A holistic approach to web performance
A holistic approach to web performanceA holistic approach to web performance
A holistic approach to web performance
 
Going Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mablGoing Microserverless on Google Cloud @ mabl
Going Microserverless on Google Cloud @ mabl
 
2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기2016 NDC - 모바일 게임 서버 엔진 개발 후기
2016 NDC - 모바일 게임 서버 엔진 개발 후기
 
Embracing Serverless with Google
Embracing Serverless with GoogleEmbracing Serverless with Google
Embracing Serverless with Google
 

Viewers also liked

WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
Igalia
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Amanda Lam
 
SqueakGTK
SqueakGTKSqueakGTK
SqueakGTK
ESUG
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)
Igalia
 
Introduce gobject introspection
Introduce gobject introspectionIntroduce gobject introspection
Introduce gobject introspection
Young-Ho Cha
 
نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3
Ali Vakilzade
 
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Igalia
 
Gtk development-using-glade-3
Gtk development-using-glade-3Gtk development-using-glade-3
Gtk development-using-glade-3
caezsar
 
How to use WebKitGtk+
How to use WebKitGtk+How to use WebKitGtk+
How to use WebKitGtk+Joone Hur
 
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
Igalia
 
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Igalia
 
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Igalia
 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
Anurag
 
WebKitGtk+ Project
WebKitGtk+ ProjectWebKitGtk+ Project
WebKitGtk+ ProjectJoone Hur
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
Igalia
 
Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)
Igalia
 

Viewers also liked (17)

WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
 
SqueakGTK
SqueakGTKSqueakGTK
SqueakGTK
 
Gnome census
Gnome censusGnome census
Gnome census
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)
 
Introduce gobject introspection
Introduce gobject introspectionIntroduce gobject introspection
Introduce gobject introspection
 
نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3
 
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
 
Gtk development-using-glade-3
Gtk development-using-glade-3Gtk development-using-glade-3
Gtk development-using-glade-3
 
How to use WebKitGtk+
How to use WebKitGtk+How to use WebKitGtk+
How to use WebKitGtk+
 
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
 
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
 
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
 
WebKitGtk+ Project
WebKitGtk+ ProjectWebKitGtk+ Project
WebKitGtk+ Project
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
 
Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)
 

Similar to LCA2013 : Implementing threaded accelerated compositing in WebKitGtk+

Hardware Acceleration in WebKit
Hardware Acceleration in WebKitHardware Acceleration in WebKit
Hardware Acceleration in WebKit
Joone Hur
 
Famo.us introduction
Famo.us introductionFamo.us introduction
Famo.us introduction
Allen Wu
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
Todd Whitehead
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
Nilesh Bafna
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Karambir Singh Nain
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering PipelineHyungwook Lee
 
Netflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV DevicesNetflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV Devices
Matt McCarthy
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Doris Chen
 
Writing Tools using WebKit
Writing Tools using WebKitWriting Tools using WebKit
Writing Tools using WebKit
Ariya Hidayat
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the Screen
Igor Talic
 
Sina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudSina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudcong lei
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionDzmitry Varabei
 
Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter BootstrapKevingo Tsai
 
Sweet Streams (Are made of this)
Sweet Streams (Are made of this)Sweet Streams (Are made of this)
Sweet Streams (Are made of this)
Corneil du Plessis
 
Minimalism in Web Development
Minimalism in Web DevelopmentMinimalism in Web Development
Minimalism in Web Development
Jamie Matthews
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
philogb
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)johnnybiz
 

Similar to LCA2013 : Implementing threaded accelerated compositing in WebKitGtk+ (20)

Hardware Acceleration in WebKit
Hardware Acceleration in WebKitHardware Acceleration in WebKit
Hardware Acceleration in WebKit
 
Famo.us introduction
Famo.us introductionFamo.us introduction
Famo.us introduction
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
 
Netflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV DevicesNetflix Webkit-Based UI for TV Devices
Netflix Webkit-Based UI for TV Devices
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
 
Writing Tools using WebKit
Writing Tools using WebKitWriting Tools using WebKit
Writing Tools using WebKit
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the Screen
 
Sina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloudSina App Engine - a distributed web solution on cloud
Sina App Engine - a distributed web solution on cloud
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and Composition
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
Playframework + Twitter Bootstrap
Playframework + Twitter BootstrapPlayframework + Twitter Bootstrap
Playframework + Twitter Bootstrap
 
Sweet Streams (Are made of this)
Sweet Streams (Are made of this)Sweet Streams (Are made of this)
Sweet Streams (Are made of this)
 
Minimalism in Web Development
Minimalism in Web DevelopmentMinimalism in Web Development
Minimalism in Web Development
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)
 

Recently uploaded

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

LCA2013 : Implementing threaded accelerated compositing in WebKitGtk+

  • 1. Implementing Threaded Accelerated Compositing in WebKit GTK+ Gwang Yoon Hwang ryumiel@company100.net www.dorothybrowser.com
  • 4. Current WebKit2 Gtk+ Web Process UI Process LayerTreeHostGtk GraphicsLayerTextureM apper Tree TextureMapperLayer Tree Cairo Surface
  • 5. Motivation The main thread - Too busy to perform compositing •  Layout •  Script •  DOM •  Network •  ...
  • 6. Off-the-main-thread Compositing Main Thread Compositing Thread Loading dfsadfMAin Parsing Scripting Styling Layout Compositing Animating
  • 7. What We Want Slow Scroll/ Zoom Fast Scroll/ Zoom Process User I/O Event Compositor Thread Main Thread WebCompositorInputHandler Viewport update Play Cached KeyFrame Animation CSS Keyframe Animation Layout / CPU Rasterization LayerTreeHost Sync. Layers LayerTreeHostProxy Draw Rasterized Layer Rasterized Layer Rasterized Layer JavasScript Execution
  • 8. Our Requirements •  Responsiveness o  Keep UI responsive at all time •  Stability o  Do not crash UI Process •  Memory Usage o  Conserve GPU memory •  Maintainability o  Share code as much as possible
  • 9. Several Approaches •  Core Animation o  Mac •  Chromium Compositor o  Chromium •  Coordinated Graphics System o  Qt, EFL
  • 10. Coordinated Graphics System RenderLayer Tree GraphicsLayerTextureM apper Tree TextureMapperLayer CoordinatedGraphicsLa yer Tree Texture Mapper Coordinated Graphics
  • 11. Coordinated Graphics System Web Process CoordinatedLayerTreeHost UI Process IPC CoordinatedLayerTreeHostProxy LayerTreeRenderer CoordinatedGraphicsLayer Tree TiledBackingStore GraphicsLayerTextureMapp er Tree CoordinatedBackingStore
  • 12. Coordinated Graphics System •  Good Things o  Memory Usage §  o  Tiled Backing Store on layers Maintainability §  Share code as much as possible •  Restrictions o  WebKit2 only o  UI Process will be complex o  Weak at GPU bugs
  • 13. Our Implementation •  Support both WebKit 1 & 2 •  Keep UI Process simple •  Crash gracefully on GPU bugs •  Benefits from Coordinated Graphics System
  • 14. Threaded Compositor for GTK+ Web Process Main Thread CoordinatedLayerTreeHost CoordinatedGraphicsLayer Tree TiledBackingStore Compositing Thread Message Queue LayerTreeRenderer TextureMapperLayer Tree CoordinatedBackingStore UI Process
  • 15. Refactor Coordinated Graphics Web Process Web Process IPC Main Thread Compositing Thread CoordinatedLayerTree LayerTreeRenderer Threaded enqueueCoordinatedOperation(CoordinatedOperation) commitCoordinatedOperation() CoordinatedGraphics Layer CoordinatedOperation CreateLayer DeleteLayer SetRootLayer SyncLayerState SetLayerChildren ... TextureMapperLayer
  • 16. Demo
  • 17. Performance Intel Core i5-2400@3.10Ghz, Geforce GTS450, Ubuntu 12.04 x86_64
  • 18. Current Status •  Design Document o  Threaded Coordinated Graphics in GTK+ Port Design Document •  Contributing Threaded Compositor to the WebKit trunk o  Master Bug: Bug 100341 - Implement threaded model of Coordinated Graphics
  • 20. Q&A
  • 21. Plan Step 1. Refactor Coordinated Graphics in WebKit2 Qt Step 2. Implement Threaded Coordinated Graphics in WebKit1 Qt / GTK+ Step 3. Implement Threaded Coordinated Graphics in WebKit2 GTK+
  • 22. Refactor Coordinated Graphics •  Current Pipelines o  IPC based Coordinated Graphics o  TextureMapper using GPU o  TextureMapper using software renderer •  Unite compositing Pipelines o  All ports that use TextureMapper will use Coordinated Graphics.