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

[WIN32SS][NTGDI] Text/Font Rotation/Transformation with optimization #1708

Closed
wants to merge 5 commits into from
Closed

[WIN32SS][NTGDI] Text/Font Rotation/Transformation with optimization #1708

wants to merge 5 commits into from

Conversation

katahiromz
Copy link
Contributor

@katahiromz katahiromz commented Jul 1, 2019

Purpose

JIRA issue: CORE-11848, CORE-16020

  • Enable text/font rotation/transformation by lfEscapement and WorldTransform.
  • Split IntExtTextOutW function to IntExtTextOutZeroAngleW and IntExtTextOutAnyAngleW functions.
  • Add IntNormalizeAngle and IntScaleMatrix functions.
  • Delete ScaleLong function.
  • add const to some parameters of some FLOATOBJ_* functions.

TODOs

  • Optimize more.
  • Do tests.

@katahiromz katahiromz added the WIP label Jul 1, 2019
@katahiromz katahiromz changed the title [WIN32SS][NTGDI] Text/Font Rotation with optimization [WIN32SS][NTGDI] Text/Font Rotation/Transformation with optimization Jul 1, 2019
@JoachimHenze
Copy link
Contributor

Thx Katayama for the improved version.
I propose that the tests should also cover the real-world-testcase of RawTherapy from CORE-16020 again. I propose we experiment with that in a private build before merging the PR to master.

@katahiromz
Copy link
Contributor Author

wrong
Wrong.

@katahiromz
Copy link
Contributor Author

fixing
OK. Let's enter the testing stage...

@katahiromz
Copy link
Contributor Author

katahiromz commented Jul 4, 2019

success
Success!

@katahiromz
Copy link
Contributor Author

katahiromz commented Jul 4, 2019

wrong
Wrong at RawTherapee. Why are texts invisible?

The target font is "DejaVu Sans", -352 and WorldTransform {0.031250, 0, 0, 0.031250, 0, 0}.

@katahiromz katahiromz added the WIP label Jul 4, 2019
@katahiromz katahiromz removed the request for review from HBelusca July 4, 2019 13:48
@katahiromz
Copy link
Contributor Author

katahiromz commented Jul 5, 2019

Gotcha!
gotcha

I will add clipping optimization and cache optimization...

}

efTemp = *pef;
FLOATOBJ_MulLong(&efTemp, INT_TO_FIXED(1));
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't understand that, can you explain to me?

Copy link
Contributor Author

@katahiromz katahiromz Jul 5, 2019

Choose a reason for hiding this comment

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

INT_TO_FIXED is defined in $(FREETYPE)\include\freetype\internal\ftcalc.h as follows:

#define INT_TO_FIXED( x )      ( (FT_Long)(x) * 65536 )  /* << 16 */

Thus this macro returns a 16.16 fixed point (FT_Fixed) from an integer value. FIXED means FT_Fixed in FreeType. This code is multiplication of a FLOATOBJ value and a FT_Fixed value. You can see FT_Matrix in $(FREETYPE)\include\freetype\fttypes.h, that has its FT_Fixed members. FLOATOBJ_GetLong(&efTemp); will return the integral part of a value multiplied by 65536.

@katahiromz
Copy link
Contributor Author

katahiromz commented Jul 5, 2019

Do you have any ideas how to optimize more? Or merge now?

@HBelusca HBelusca added bugfix For bugfix PRs. enhancement For PRs with an enhancement/new feature. review pending For PRs undergoing review. labels Jul 5, 2019
@HBelusca HBelusca requested review from tkreuzer and ThFabba July 5, 2019 14:46
@katahiromz
Copy link
Contributor Author

sluggish
RawTherapee is still 'sluggish'.

@katahiromz
Copy link
Contributor Author

Temporarily closed.

@katahiromz katahiromz closed this Jul 6, 2019
@katahiromz
Copy link
Contributor Author

Reopened.

@katahiromz katahiromz reopened this Jul 6, 2019
@katahiromz katahiromz closed this Jul 6, 2019
@katahiromz katahiromz reopened this Jul 6, 2019
@katahiromz katahiromz closed this Jul 6, 2019
@HBelusca
Copy link
Contributor

HBelusca commented Jul 6, 2019

So.... what happened with this PR?

@katahiromz
Copy link
Contributor Author

I retired.

@JoachimHenze
Copy link
Contributor

In case it will be reopened: we need to retest CORE-16020 and CORE-16177 before committing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix For bugfix PRs. enhancement For PRs with an enhancement/new feature. review pending For PRs undergoing review.
Projects
None yet
5 participants