Page MenuHomePhabricator

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

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

Details

Reviewers
Hermet
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 D8880

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11387
zmike created this revision.Fri, May 10, 11:39 AM
zmike requested review of this revision.Fri, May 10, 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
2401–2402

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

zmike added a comment.Mon, May 13, 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
2401–2402

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.Mon, May 13, 9:24 AM
zmike edited the summary of this revision. (Show Details)

depend on clipper_is_static

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

I guess this will break origin behavior.

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

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.Tue, May 14, 5:47 AM