Page MenuHomePhabricator

vg_common_svg: Prevent duplicate operations for percentage value
ClosedPublic

Authored by jsuya on Apr 18 2019, 6:52 PM.

Details

Summary

x1, y1, x2 and y2 of Svg_Linear_Gradient structure must be a percentage value.(0 ~ 1)
but these variables are reused with efl_gfx_gradient_linear_start/end_set/get
and duplicate operations occur.

Test Plan

N/A

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.Apr 18 2019, 6:52 PM
jsuya requested review of this revision.Apr 18 2019, 6:52 PM
jsuya updated this revision to Diff 21489.Apr 18 2019, 6:57 PM

update code

Hermet requested changes to this revision.Apr 18 2019, 8:47 PM

Please check a comment.

src/static_libs/vg_common/vg_common.h
170

Not adding new variables, but how about share the x1, y1, x2, y2?

Seems it just needs a boolean variable
Eina_Bool unit_percentage: true/false;

What do you think?

This revision now requires changes to proceed.Apr 18 2019, 8:47 PM
jsuya updated this revision to Diff 21492.Apr 18 2019, 9:38 PM

remove unnecessary values

jsuya updated this revision to Diff 21494.Apr 18 2019, 9:39 PM
jsuya retitled this revision from vg_common_svg : Add coordinate values in Svg_Linear_Gradient structure to vg_common_svg: Prevent duplicate operations for percentage value.
jsuya edited the summary of this revision. (Show Details)

update commit message

Hermet accepted this revision.Apr 18 2019, 9:55 PM
This revision is now accepted and ready to land.Apr 18 2019, 9:55 PM
This revision was automatically updated to reflect the committed changes.