Ghost Kernel

Canvas implementation, desktop application 2016/07/11, 17:08:20

The latest commit includes a canvas implementation and the first steps for an actual desktop.

A canvas component is needed to allow applications to freely draw on a buffer in memory, which is usually only done by window server. The use case for this canvas is for example drawing a task-bar from within the desktop application or providing a space to draw images from client-side. It will also be the basis for other user-drawn components.

Unlike other UI components, the content of a canvas is entirely rendered by the component creator instead of the server. The implementation for this is done with a combination of shared memory and messaging. The client requests creation of a canvas component just as with any other component, and the window server notifies the client with events when the buffer has been allocated.

The most challenging issue with a shared memory buffer is avoiding the client application to cause faulty memory accesses when the buffer needs to be resized (i.e. after relayouting). This is now solved by simply retaining the previous buffer until the client application sends an _acknowledge message_ to the window server. This consumes more memory until the buffer is acknowledged but improves stability. A nice little discussion on this topic was led in the OSDev forums.


Write a comment...
  • elarmasag 2022/11/22, 10:32:16

    The FDA has approved its use to delay breast cancer so it can be prescribed for any patient at increased risk for breast cancer <a href=>buy clomid</a>

  • lacrabe 2022/11/17, 06:06:04

    <a href=>lasix for pulmonary edema</a> Hence, the items on the list are meant as evidence based advisories to our colleagues in clinical oncology, with the suggestion that the recommendations represent an opportunity for in depth discussions with the patient and individualized treatment planning

  • Unjurnfub 2022/11/05, 10:22:01

    <a href=>nolva tamoxifen</a> Pretty much the same

  • flineft 2022/10/24, 15:52:13

    Cancer Epidemiol Biomarkers Prev 5 961 965 <a href=>ivermectin cost</a> PubMed 33340904

  • Vemmootte 2022/09/13, 15:56:15

    Schally AV, Kastin AJ, Arimura A. <a href=>nolvadex pct where to buy</a> Both in BRCA1 mutation carriers HR 1.

  • JailiaceM 2022/09/03, 15:05:20

    Silently observing the surrounding environment, Emperor Liu commented buy cialis online united states This place Zhao Puxuan is very ordinary Looking at Liu Yang, who was following him, Emperor Liu Make Your Penis Huge how to cope with erectile dysfunction asked, Do you think that I am too polite to Zhao Pu when I personally come to visit Zhao Pu and bring you, the prince Hearing the question, buy cialis online united states Liu Yang returned to his senses, best lube for erectile dysfunction shook his head and said, Father treats ministers with courtesy, and this is to show the world that you value the wise men <a href=>generic priligy online</a>

  • Sturrygar 2022/08/18, 04:19:54

    <a href=>ivermectin for rosacea</a> Zithromax Weekly

  • Spearve 2022/07/29, 08:21:27

    [url=]purchase cialis online[/url] Order Doxycycline Hyclate

  • Irvan 2016/11/02, 20:07:43

    This is one of best hobbyst OS design that I've ever meet

  • Al Tan 2016/08/07, 22:43:05

    Thumbs up. Thanks for this ongoing project. Looks awesome!

    • Max 2016/08/15, 04:51:21

      Thanks for the support! Appreciate it a lot!