Page MenuHomePhabricator

evas/render: clamp mask surface size to clipper size
Needs ReviewPublic

Authored by zmike on Mon, May 6, 1:17 PM.

Details

Reviewers
cedric
Hermet
Summary

there's no point in allocating a massive mask surface if it's going to
be clipped to a smaller size, so instead just allocate the smaller size
and position it where the clipped size would be

this can only be enabled if the clipper is known to not be changing size,
as performance would be impacted if the clipper was forcing a full mask
redraw due to regular resizing

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11386
zmike created this revision.Mon, May 6, 1:17 PM
zmike requested review of this revision.Mon, May 6, 1:17 PM
zmike updated this revision to Diff 22015.Tue, May 7, 10:21 AM
zmike edited the summary of this revision. (Show Details)

fix shadow warnings

Hermet requested changes to this revision.Wed, May 8, 7:06 PM
Hermet added a subscriber: Hermet.

Please check comment.

src/lib/evas/canvas/evas_render.c
1781–1782

don't need to clip every time, but it could keep the clipped cache, so pass mask->cur->cache.clip.x, y, w, h, directly.
Others calls too.

This revision now requires changes to proceed.Wed, May 8, 7:06 PM
zmike updated this revision to Diff 22055.Thu, May 9, 6:04 AM

use cache clip directly

Hermet requested changes to this revision.Mon, May 13, 2:52 AM

Considering caching behavior, this doesn't helpful because Clipping region could be adjustable.
If you draw only valid region, the mask image would be rendered several times whenever clip area is changed.

Does this patch really necessary?

This revision now requires changes to proceed.Mon, May 13, 2:52 AM
zmike added a comment.Mon, May 13, 4:47 AM

If the clipping area is not changed frequently then this provides a massive performance boost.

I wonder if it would make sense to just use the direct clipper geometry for this and the related proxy sizing patch; the cases that these are being written for is when there is a static clipper applied to the proxy/mask which always causes them to be clipped to a smaller size.

zmike requested review of this revision.Mon, May 13, 4:47 AM
zmike updated this revision to Diff 22131.Mon, May 13, 9:24 AM
zmike edited the summary of this revision. (Show Details)

depend on clipper_is_static