Page MenuHomePhabricator

elementary/perf:remove unnecessary elm_widget_is() check
ClosedPublic

Authored by smohanty on Jun 16 2020, 10:48 PM.

Details

Summary

As we always make sure the parent is a widget class we don't have to check anymore.

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.
smohanty created this revision.Jun 16 2020, 10:48 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

smohanty requested review of this revision.Jun 16 2020, 10:48 PM
Hermet accepted this revision.Jun 16 2020, 10:51 PM

good to me.

This revision is now accepted and ready to land.Jun 16 2020, 10:51 PM
CHAN added a comment.Jun 16 2020, 10:51 PM

Looks good to me.
may some other guy will accept it. :)

bu5hm4n requested changes to this revision.Jun 16 2020, 11:11 PM
bu5hm4n added a subscriber: bu5hm4n.

I think you can go ahead and simply remove these efl_isa calls.

The parent (if set) is always a efl.ui.widget. Or the code at A would have already crashed. More importantly: in the .eo files parent is annotated as widget, and in all signatures as well, so this was never meant to work with a none efl.ui.object.

src/lib/elementary/efl_ui_widget.c
1450

Reference A.

This revision now requires changes to proceed.Jun 16 2020, 11:11 PM
smohanty updated this revision to Diff 30665.Jun 16 2020, 11:36 PM

updated review comment.

smohanty marked an inline comment as done.Jun 16 2020, 11:36 PM
smohanty retitled this revision from elementary/perf: keep a flag if the parent is widget or not. to elementary/perf:remove unnecessary elm_widget_is() check.
smohanty edited the summary of this revision. (Show Details)
bu5hm4n accepted this revision.Jun 16 2020, 11:43 PM

Thank you. I checked upstream that we do not assigned parent_obj *ever* by hand. And we don't. Can you ensure the same in tizen ?

This revision is now accepted and ready to land.Jun 16 2020, 11:43 PM

Thank you. I checked upstream that we do not assigned parent_obj *ever* by hand. And we don't. Can you ensure the same in tizen ?

In tizen no where they directly assign to parent_obj.

Closed by commit rEFL95eb621c1546: elementary/perf:remove unnecessary elm_widget_is() check (authored by smohanty, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyJun 16 2020, 11:57 PM
This revision was automatically updated to reflect the committed changes.