Investigate redraw across TopLevel Boundaries + Redraw currently Redraws it all
migueldeicaza opened this issue · 4 comments
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.
// 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.
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.
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 generalWhen 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.
Fixed