WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
156794
Make glyphToWidth cache correctly
https://bugs.webkit.org/show_bug.cgi?id=156794
Summary
Make glyphToWidth cache correctly
Hyungwook Lee
Reported
2016-04-20 05:59:10 PDT
Currently only English can use glyphToWidth cache so another language's text layout and drawing performance is not good.
Attachments
Patch
(1.55 KB, patch)
2016-04-20 06:13 PDT
,
Hyungwook Lee
mmaxfield
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Hyungwook Lee
Comment 1
2016-04-20 06:13:48 PDT
Created
attachment 276820
[details]
Patch
Myles C. Maxfield
Comment 2
2016-04-20 09:11:15 PDT
Comment on
attachment 276820
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=276820&action=review
> Source/WebCore/platform/graphics/GlyphMetricsMap.h:109 > + return page;
Why do you skip the page filling for the non-primary pages, but not skip page filling for the primary page? These two should be the same (the zero page is just used as a cache)
Myles C. Maxfield
Comment 3
2016-04-20 09:12:02 PDT
(In reply to
comment #2
)
> Comment on
attachment 276820
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=276820&action=review
> > > Source/WebCore/platform/graphics/GlyphMetricsMap.h:109 > > + return page; > > Why do you skip the page filling for the non-primary pages, but not skip > page filling for the primary page? These two should be the same (the zero > page is just used as a cache)
Also, please add a test.
Hyungwook Lee
Comment 4
2016-04-20 20:44:01 PDT
(In reply to
comment #2
)
> Comment on
attachment 276820
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=276820&action=review
> > > Source/WebCore/platform/graphics/GlyphMetricsMap.h:109 > > + return page; > > Why do you skip the page filling for the non-primary pages, but not skip > page filling for the primary page? These two should be the same (the zero > page is just used as a cache)
Current patch doesn't skip the page filling for the non-primary pages. I just prevent the page re-filling that already filled when we create it. I think the root cause of current issue is that we always re-filling non-primary pages even if we set glyph's width in Font::widthForGlyph()
Hyungwook Lee
Comment 5
2016-04-21 23:24:43 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Comment on
attachment 276820
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=276820&action=review
> > > > > Source/WebCore/platform/graphics/GlyphMetricsMap.h:109 > > > + return page; > > > > Why do you skip the page filling for the non-primary pages, but not skip > > page filling for the primary page? These two should be the same (the zero > > page is just used as a cache) > > Also, please add a test.
GlyphMetricsMap is not public API and it is related to Cache operation. Do you have idea to make a test?
Myles C. Maxfield
Comment 6
2016-05-02 18:44:48 PDT
(In reply to
comment #5
)
> (In reply to
comment #3
) > > (In reply to
comment #2
) > > > Comment on
attachment 276820
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=276820&action=review
> > > > > > > Source/WebCore/platform/graphics/GlyphMetricsMap.h:109 > > > > + return page; > > > > > > Why do you skip the page filling for the non-primary pages, but not skip > > > page filling for the primary page? These two should be the same (the zero > > > page is just used as a cache) > > > > Also, please add a test. > > GlyphMetricsMap is not public API and it is related to Cache operation. > Do you have idea to make a test?
I think we should make a layout test (not a unit test). Therefore, we should find a way that a webpage can cause this code to be invoked, and we should make a test page that does so, and make sure the result is as expected. If you have more questions about how to do this, I am happy to answer them.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug