Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate redraw across TopLevel Boundaries + Redraw currently Redraws it all #30

Closed
migueldeicaza opened this issue Mar 26, 2021 · 4 comments

Comments

@migueldeicaza
Copy link
Owner

migueldeicaza commented Mar 26, 2021

I suspect that the expose system does not cross the Toplevel boundary, to determine affected regions.

So if a top-level damages the contents below it, we do not send the paint request (right now it might be, we might be overdrawing something, or there might have been a hack I added recently). But I suspect that the redraw logic does not cross toplevel boundaries right now.

Other issues include:

  • Menu from a lower TopLevel pops up on the bottom layer, and I think it should pop up on the top-level, to ensure that it is properly displayed, or to create a new transparent Toplevel where to insert itself, to render on top of everything else.

We need a proper system to queue "pendingOperations" and not "postProcessEvent", which is currently called on every input key, but also, from the Terminal emulator as a band-aid.

@migueldeicaza
Copy link
Owner Author

        // This is a case where we could have use redrawView, but it
        // currently does not take into consideration a global state of
        // affected areas, which we probably should review.
        //
        // At least we should have a refresh version that does not queue
        // a setNeedsDisplay.   Also see postProcessEvent, it worked
        // in the previous era where the Toplevels would consume the whole
        // screen and full obscure the back, but we should cross those
        // boundaries and repaint even those.

@migueldeicaza migueldeicaza changed the title Investigate Investigate redraw across TopLevel Boundaries + Redraw currently Redraws it all Mar 28, 2021
@migueldeicaza
Copy link
Owner Author

migueldeicaza commented Apr 7, 2021

Idea that I have been mulling around:

Implemented: Toplevels would contain the backing store for the drawn operations, and views retain their existing redraw logic. This means that not every view would need a backing store that needs to be composed. Only toplevels get composed.

@migueldeicaza
Copy link
Owner Author

migueldeicaza commented Apr 12, 2021

Update:

I now have a backingstore branch with the above idea, and it works.

Some issues that still need work and research:

  • The code is still redoing full screen redraws, rather than the affected region in general
  • When coming back from the dialog box, and moving in the selector, the tiny window borders in the sample vanish.
  • Dragging a window still leaves a ghost behind, I suspect that is a different kind of issue, not related to the compositing.
  • Small border rendering issue when using the "Dialogs" sample, both on the "Reuslts" box, and when the Dialog opens, on the right side, it does not seem to draw that part.

@migueldeicaza
Copy link
Owner Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant