Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg_loader SvgLoader: Print inefficient elements #189

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

JSUYA
Copy link
Member

@JSUYA JSUYA commented Dec 17, 2020

Copy link
Member

@hermet hermet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check comments

@@ -347,4 +347,33 @@ struct SvgLoaderData
bool result = false;
};

#ifdef THORVG_LOG_ENABLED
inline string nodeTypeToString(SvgNodeType type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it necessary to use inline? leave to compiler if possible
Also, if it uses only in _inefficientNodeCheck(), you can move it in one same place.

#ifdef THORVG_LOG_ENABLED
static string _nodeTypeToString()
{
...
}
static void _inefficientNodeCheck()
{
...
}
#endif

Copy link
Member Author

@JSUYA JSUYA Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed inline
and _nodeTypeToString is also used in XmlParser.cpp. Therefore, it cannot be moved to tvgSvgLoader.

src/loaders/svg/tvgSvgLoader.cpp Outdated Show resolved Hide resolved
@hermet hermet added the enhancement Improve features label Dec 17, 2020
Opacity is 0
both Fill.Opacity and Stroke Opacity are 0
point is 0 in Path
declared display="none"
width or height of bounds becomes 0
@hermet hermet merged commit 23331cf into master Dec 17, 2020
@hermet hermet deleted the devs/jsuya/inefficient branch December 22, 2020 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants