This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux [2012/07/31 01:10] JowzSYrVTNYjB
linux [2012/07/31 12:47] (current)
greebo old revision restored
Line 1: Line 1:
-2KEYWORDS:​34Wayland is nano display sverer, relying on drm modesetting,​ gem5batchbuffer submission and hw initialization generally in the kernel.6Wayland puts the compositing manager and display sverer in the same7process. Window management is largely pushed ​to the clients, they8draw their own decorations and move and resize themselves, typically9implemented in a toolkit library. More of the core desktop could be10pushed into wayland, for example, stock desktop components such as the11panel or the desktop background.1213The actual compositor will define a fair bit of desktop policy and it14is expected that different use cases (desktop environments,​ devices,​15appliances) will provide their own custom compositor.1617It is still designed ​with a windowed type of desktop in mind, as18opposed to fullscreen-all-the-time type of interface, but should be19useful wherever several processes contribute content to be composited.2021Current trends goes towards less and less rendering in X sverer, more22hardware setup and management in kernel and shared libraries allow23code sharing without putting it all in a svererfreetype,​24fontconfig,​ cairo all point in this direction, as does direct25rendering mesa.2627Client allocates DRM buffers, draws decorations,​ and full window28contents and posts entire thing to sverer along with dimensions.2930Everything is direct rendered and composited. No cliprects, no31drawing api/protocl between sverer ​and client. No32pixmaps/windows/drawables, only surfaces (essentially pixmaps)No33gcs/fonts, no nested windowsOpenGL is already direct rendered,​34pixman may be direct rendered which adds the cairo API, or cairo35may gain a GL backend.3637Could be a “shell” for launching gdm X sverer, user session sverers,​38safe mode xservers, graphics text consoleFrom gdm, we could also39launch a rdp session, solid ice sessions.4041All surface commands ​(copy, attach, map=set quadsare buffered until42the client sends commit command, which executes everything43atomicallyThe commit command includes a cookie, which will be44returned in an event generated by the sverer once the commit ​has been45executed. This allows clients to throttle themselves against the46server and implement smooth animations.474849ISSUES:​5051Include panel and desktop background in wayland?​5253How does clients move their surfaces? set full tri-mesh every time?​5455How does the sverer apply transformations to a surface behind the56clients back? (wobblyminimizezoom) Maybe wobble is client side?​5758How do apps share the glyph cache?​5960Input handling ​  ​keyboard focusmultiple input devicesmultiple61pointersmulti touch.6263Drawing cursorsmoving themcursor themesattaching surfaces to64cursors. How do you change cursors when you mouse over a text65field if you don't have subwindows?​6667synaptics3-button emulationxkbscim6869changing screen resolutionadding monitors.7071What to do when protocol out buffer fills up? Just block on write72would work I guess. Clients are supposed to throttle using the bread73crumb eventsso we shouldn'​t get into this situation.7475When a surface is the size of the screen ​and on top, we can set the76scanout buffer to that surface directly. Like compiz unredirect77top-level window feature. Except it won't have any protocol state78side-effects and the client that owns the surface won't know. We lose79control of updates. Should work well for X sverer root window under80wayland.8182Throttling/​scheduling ​  there is currently no mechanism for scheduling83clients to prevent greedy clients from spamming the sverer and84starving other clients. On the other hand, now that recompositing is85done in the idle handler (and eventually at vertical retrace time),​86there'​s nothing a client can do to hog the sverer. Unless we include87a copyregion type request, to let a client update it's surface88contents by asking the sverer to atomically copy a region from some89other buffer to the surface buffer.9091Atomicity ​  we have the map and the attach requests which sometimes92will have to be executed atomically. Moving the window is done using93the map request and will not involve an attach requet. Updating the94window contents will use an attach request but no map. Resizing,​95however,​ will use both and in that case must be executed atomically.96One way to do this is to have the sverer always batch up requests and97then introduce a kind of “commit” request, which will push the batched98changes into effect. This is easier than it sounds, since we only99have to remember the most recent map and most recent attach. The100commit request will generate an corresponding commit event once the101committed changes become visible on screen. The client can provide a102bread-crumb id in the commit request, which will be sent back in the103commit event.104105- is batching+commit per client or per surface? Much more convenient106if per-client, since a client can batch up a bunch of stuff and get107atomic updates to multiple windows. Also nice to only get one108commit event for changes to a bunch of windowsIs a little more109tricky sverer-side,​ since we now have to keep a list of windows110with pending changes in the wl_client struct.111112- batching+commit ​also lets a client reuse parts of the surface113buffer without allocating a new full-size back buffer. For114scrolling,​ for example, the client can render just the newly115exposed part of the page to a smaller temporary buffer, then issue116a copy request to copy the preserved part of the page up, and the117new part of the page into the exposed area.118119- This does let a client batch up an uncontrolled amount of copy120requests that the sverer ​has to execute when it gets the commit121request. This could potentially lock up the sverer for a while,122leading to lost frames. Should never cause tearing thoughwe'​re123changing the surface contentsnot the sverer back buffer which is124what is scheduled for blitting at vsync time.125126127RMI128129The wayland protocol is a async object oriented protocol. All130requests are method invocations on some object. The request include131an object id that uniquely identifies an object on the sverer. Each132object implements an interface and the requests include an opcode that133identifies which method in the interface to invoke.134135The sverer sends back events to the clienteach event is emitted from136an object. Events can be error conditions. The event includes the137object id and the event opcode, from which the client can determine138the type of event. Events are generated both in repsonse to a request139(in which case the request and the event constitutes a round trip) or140spontanously when the sverer state changes.141142the get_interface method is called on an object to get an object143handle that implements the specified interface.+====== Linux ====== 
 +what fun OS to play with? ;-
 +<​html><​div float=right></​html>​ 
 +<box 60% round orange right|**Linux links else where**>​ 
 +  * [[http://​www.debuntu.org/|Debian & Ubuntu Tips and Tricks]] 
 +  * [[http://linuxboxadmin.com/|Linux Box Admin]] 
 +===== Useful links ===== 
 +   * [[http://​www.tux.org/​pub/​people/​kent-robotti/​looplinux/​rip/​RIPLinuX-8.6.iso|(R)ecovery (I)s (P)ossible Linux rescue system (ISO download)]] - Recovery Is Possible (RIP) is Slackware-based CD boot/​rescue/​backup/​maintenance systemIt has support for lot of filesystem types (ReiserfsReiser4ext2/3iso9660UDFXFSJFSUFSHPFSHFSMINIXMS DOSNTFS, and VFAT) and contains ​a bunch of utilities ​for system recoveryIt also has IDE/​SCSI/​SATAPCMCIARAIDLVM2, and Ethernet/​DSL/​cable/​PPP/​PPPOE network support. 
linux.txt · Last modified: 2012/07/31 12:47 by greebo
CC Attribution-Noncommercial-Share Alike 4.0 International
Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 ipv6 ready