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
Support compositingMode in Bloc-Alexandrie (WIP) #268
Conversation
…es it It's used when the element responds true to wantsSeparateCompositingLayer.
Thanks @tinchodias, I don't understand wantsCompositionLayer option ? |
hi @labordep that's the testing method that the element uses to check if it will cachecin a surface. Any of the 3 options I enumerated makes the testing method answer true |
Ok thanks :-) |
Just a comment about that, We noticed also a slow down when using some effects, i think that the buffering is not efficient. But when i use '''beInSingleCompositionLayer''' it is still slow... I think there is a lot of computations when moving a BlElement container, even if it is buffered... |
And i think that a Form is NOT the solution for buffering, It have to be a primitive element from the Canvas, an efficient buffer manipulated by the native canvas and cached by the BlElement as an external ressource pushed to the canvas at will to avoid redrawing... (like a CairoTexture ? ) |
Hi @ELePors !
this can be key But (assuming you have loaded the PR #268)... Some points that come to my mind, I hope any of them help:
|
And if the BlElement is buffered and not dirty, when we change his position, it shoud not alter subElements... or we should have a way to move it without recomputing, and afrer move is finished, force computation... if you see what i mean ? (i am on dev-1.0 and up to date) |
Ah but this PR is the only that makes layers work |
i just checked out the alexandrie_composition_layer branch ? Is it that ? |
When an element changes, will |
@ELePors you can send the beInSingleCompositionLayer to the CWMap |
Ok (i am on discord if you prefer) |
Previous approach could be useful in certain scenarios, so I might recover it. It's problem was that a transformed element was being drawn with the identity matrix and then transformed at paint, resulting in poor quality.
Failing tests are not produced by this PR |
It may be too simplistic support, I should check non-trivial examples.
Basically, when an element has to draw itself on a canvas and responds true to
wantsSeparateCompositingLayer
, then it's cached in a Cairo surface that, if didn't change, will be reused on next space redraw.There are three options:
anElement beInSingleCompositionLayer
, that caches itself and all recursive children in a single surface (it doesn't matter if any of the children have one of these options)anElement beInSeparateCompositionLayer
, that is similar to previous option but any children can be cached separately.wantsCompositionLayer
. This is the case forBlGaussianShadowEffect
.