Guest User

Untitled

a guest
Jan 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. # WebRender benefits
  2.  
  3. Fundamentally, WebRender is designed to render CSS with better performance on
  4. modern hardware than what the traditional combination of a legacy painting API
  5. like Skia and a compositor can offer. It does so by merging the painting and
  6. compositing steps together into a single API, avoiding the performance pitfalls
  7. associated with CSS properties that don't run on the compositor. Instead of an
  8. immediate mode API in which objects are rendered back-to-front, WebRender uses
  9. a retained mode API that can render objects in any order. Ultimately, WebRender
  10. works more like a game engine than a legacy PostScript-like 2D API, which is
  11. beneficial because GPUs are optimized for the patterns that game engines use,
  12. such as aggressive batching and out-of-order rendering.
  13.  
  14. Examples of common workloads that should have improved *frame rate* with
  15. WebRender include:
  16.  
  17. 1. Animations that don't use the `transform` or `opacity` properties, such as
  18. those that jQuery produces.
  19.  
  20. 2. Animations of colors and backgrounds, such as animated gradients. (Large
  21. solid colors and gradients are popular in flat design.)
  22.  
  23. 3. Animated images that aren't video.
  24.  
  25. 4. Pinch zooming of borders and backgrounds.
  26.  
  27. Examples of common workloads that should have *reduced "checkerboarding"*
  28. include:
  29.  
  30. 1. Complex borders and shadows, such as those used to create certain special
  31. effects.
  32.  
  33. 2. Complex gradients.
  34.  
  35. 3. Special visual effects such as blurs.
  36.  
  37. WebRender also fixes various long-standing bugs in Gecko's 3D transforms. It
  38. also paves the way for moving portions of image decoding to the GPU.
  39.  
  40. # Pathfinder benefits
  41.  
  42. Pathfinder is designed to bring the same performance benefits as WebRender to
  43. SVG, fonts, and canvas. The approach of Pathfinder is similar to that of
  44. WebRender, but vector graphics present a more difficult problem space, so
  45. Pathfinder is a more ambitious project. While WebRender adopts techniques that
  46. have been standard in the game industry for decades, Pathfinder represents an
  47. original approach to the problem of rendering vector graphics that is the
  48. culmination of approximately two years of Mozilla research.
  49.  
  50. As far as Gecko is concerned, Pathfinder should ultimately be regarded as a
  51. component of WebRender. This is because browsers don't render vector graphics
  52. alone; rather, vector graphics are simply one part of a Web page styled with
  53. CSS. (Additionally, the SVG specification features special effects such as blur
  54. and drop shadow that CSS also supports; it would be a needless duplication of
  55. effort to try to implement these effects in Pathfinder when WebRender already
  56. has high-quality implementations of these filters.)
  57.  
  58. Examples of workloads that benefit from Pathfinder's approach in terms of
  59. *frame rate* include:
  60.  
  61. 1. Pixel-perfect pinch zooming of pages with no blurriness.
  62.  
  63. 2. Viewing text and SVG in 3D, such as in VR.
  64.  
  65. 3. 2D canvas games.
  66.  
  67. 4. Interactive charts and infographics, such as those produced by the popular
  68. `d3.js` library used by the New York Times and others.
  69.  
  70. Examples of workloads that benefit from Pathfinder in terms of
  71. *reduced "checkerboarding"* include:
  72.  
  73. 1. PDF documents.
  74.  
  75. 2. Large complex fonts.
  76.  
  77. 3. Complex SVG graphics.
Add Comment
Please, Sign In to add comment