Page MenuHomePhabricator

evas/render: size and draw proxy render surface based on proxy clipper
ClosedPublic

Authored by zmike on May 10 2019, 11:39 AM.

Details

Summary

if a proxy is not being proxied, it's optimal to create a surface for only
the necessary dimensions and then only draw within those dimensions.

when a proxy is clipped to a size smaller than the proxy object, the required
size for the proxy render becomes smaller as the proxy has less visible area.
this enables us to draw only the clipped region and thus gives a performance
boost

this can only be enabled if the clipper is marked as static

Depends on D8841

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.May 10 2019, 11:39 AM
zmike requested review of this revision.May 10 2019, 11:39 AM

It looks if the clipping area is frequently changed, the proxy image should be updated more times.
Case by case, this may help for optimal rendering but worse at caching mechanism.

Does this necessary patch?

src/lib/evas/canvas/evas_render.c
2402–2403

Conceptually, this xy must be offset of the origin of the object, not clipping position.

zmike added a comment.May 13 2019, 4:43 AM

When used with D8878, this yields ~30% performance increase and saves ~130KiB memory per textblock.

src/lib/evas/canvas/evas_render.c
2402–2403

Right, but in the case where this is being adjusted to match the clipped size then it must also be offset by the clipped location.

zmike updated this revision to Diff 22132.May 13 2019, 9:24 AM
zmike edited the summary of this revision. (Show Details)

depend on clipper_is_static

Hermet requested changes to this revision.May 13 2019, 6:30 PM
Hermet added inline comments.
src/lib/evas/canvas/evas_render.c
2402–2403

I guess this will break origin behavior.

This revision now requires changes to proceed.May 13 2019, 6:30 PM
zmike added inline comments.May 14 2019, 5:47 AM
src/lib/evas/canvas/evas_render.c
2402–2403

No, this is what keeps that behavior functional. If the surface size is adjusted to match the clipped size, then the surface's position must be adjusted as well or else it will have the clipped (smaller) render in the same location as the full render, which will be the wrong position.

zmike requested review of this revision.May 14 2019, 5:47 AM
Hermet accepted this revision.May 22 2019, 10:46 PM
This revision is now accepted and ready to land.May 22 2019, 10:46 PM
zmike updated this revision to Diff 23501.Jul 18 2019, 6:25 AM
zmike edited the summary of this revision. (Show Details)

rename to has_fixed_size

This revision was automatically updated to reflect the committed changes.