Page MenuHomePhabricator

Efl.Canvas.Vg.Object: Optimize Ector Surface Size
ClosedPublic

Authored by jsuya on May 21 2020, 1:28 AM.

Details

Summary

The ector surface size was determined by the size of the vg object.
vg object is usually sized by the size of the container.
So, the ector surface is set unnecessarily large.
This patch sets the ector surface size to the path boundary.
And the path boundary refers to the stroke width and miterlimit.

Test Plan

vector sample


[grey area is ector surface size]

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.
jsuya created this revision.May 21 2020, 1:28 AM
jsuya requested review of this revision.May 21 2020, 1:28 AM
jsuya edited the test plan for this revision. (Show Details)May 21 2020, 1:29 AM
Hermet requested changes to this revision.May 25 2020, 7:49 PM

Please check comments.

src/lib/evas/canvas/efl_canvas_vg_container.c
309

You can remove duplicated codes..

src/lib/evas/canvas/efl_canvas_vg_object.c
718

I think we can update boundary only if pd->changed == true

This revision now requires changes to proceed.May 25 2020, 7:49 PM
jsuya updated this revision to Diff 30399.May 25 2020, 10:26 PM

Update code

  • If boundary size is 0, don't merge.
  • VG obj's boundary is calculated only when pd->changed is ture.
jsuya marked 2 inline comments as done.May 25 2020, 10:26 PM
jsuya planned changes to this revision.May 25 2020, 11:55 PM
jsuya updated this revision to Diff 30426.May 27 2020, 12:14 AM

Update code
Refers to the object's viewbox.

jsuya updated this revision to Diff 30433.May 27 2020, 1:01 AM

update code

jsuya updated this revision to Diff 30434.May 27 2020, 1:16 AM

reuse boundary info

jsuya updated this revision to Diff 30436.May 27 2020, 1:24 AM

remove empty space

jsuya updated this revision to Diff 30502.Jun 1 2020, 10:26 PM

Update code

Hermet requested changes to this revision.Jun 2 2020, 1:19 AM

Please check comments.

src/lib/evas/canvas/efl_canvas_vg_object.c
299

single line>
pd->viewbox = pd->vg_entry->vfd->view_box;

src/lib/evas/canvas/evas_vg_private.h
38

path_bounds;

This revision now requires changes to proceed.Jun 2 2020, 1:19 AM
jsuya updated this revision to Diff 30509.Jun 2 2020, 7:33 PM

Update code

Hermet accepted this revision.Jun 2 2020, 7:36 PM
This revision is now accepted and ready to land.Jun 2 2020, 7:36 PM
This revision was automatically updated to reflect the committed changes.