Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1415)

Issue 6197074: Update the implementation of SkTypeface_android.h functions. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by DerekS
Modified:
12 years, 1 month ago
Reviewers:
zhenghao1, Hao Zheng, raph, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Update the implementation of SkTypeface_android.h functions. This CL removes the hardcoded mappings of FallbackScripts to a particular font file and replaces it with a dynamic mechanism that takes a style and representative character code for a given FallbackScript class and returns the most appropriate SkTypeface that contains that character code. Committed: https://code.google.com/p/skia/source/detail?r=4111

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Total comments: 5

Patch Set 5 : #

Patch Set 6 : #

Total comments: 12

Patch Set 7 : #

Total comments: 1

Patch Set 8 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -70 lines) Patch
M include/core/SkScalerContext.h View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M include/ports/SkTypeface_android.h View 1 2 3 4 5 6 1 chunk +9 lines, -5 lines 0 comments Download
M src/core/SkGlyphCache.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/ports/SkFontHost_android.cpp View 1 2 3 4 5 6 7 9 chunks +132 lines, -65 lines 1 comment Download

Messages

Total messages: 21
DerekS
12 years, 1 month ago (2012-05-11 15:37:45 UTC) #1
DerekS
FYI...as soon as this has been reviewed I'll start the effort to move this code ...
12 years, 1 month ago (2012-05-11 16:01:09 UTC) #2
reed1
I wonder if you can write a single "safe" function to encapsulate 1. the need ...
12 years, 1 month ago (2012-05-11 16:01:27 UTC) #3
DerekS
I did the explicit locking as it will make integration with the android repo's fork ...
12 years, 1 month ago (2012-05-11 17:58:09 UTC) #4
zhenghao1
Derek, thanks for doing this. This LGTM except some nits. http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp File src/ports/SkFontHost_android.cpp (right): http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp#newcode961 ...
12 years, 1 month ago (2012-05-14 03:23:09 UTC) #5
zhenghao1
http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp File src/ports/SkFontHost_android.cpp (left): http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp#oldcode622 src/ports/SkFontHost_android.cpp:622: } Can we still do initialization for each fallback ...
12 years, 1 month ago (2012-05-14 03:31:32 UTC) #6
DerekS
http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp File src/ports/SkFontHost_android.cpp (left): http://codereview.appspot.com/6197074/diff/6001/src/ports/SkFontHost_android.cpp#oldcode622 src/ports/SkFontHost_android.cpp:622: } It would be more work to populate it ...
12 years, 1 month ago (2012-05-14 19:00:17 UTC) #7
zhenghao1
http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h File include/ports/SkTypeface_android.h (right): http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h#newcode25 include/ports/SkTypeface_android.h:25: kTamilBold_FallbackScript, One more thing: if TamilBold is not present ...
12 years, 1 month ago (2012-05-15 12:34:59 UTC) #8
DerekS
http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h File include/ports/SkTypeface_android.h (right): http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h#newcode25 include/ports/SkTypeface_android.h:25: kTamilBold_FallbackScript, I think the caller should make that decision. ...
12 years, 1 month ago (2012-05-15 13:13:33 UTC) #9
zhenghao1
On 2012/05/15 13:13:33, djsollen wrote: > http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h > File include/ports/SkTypeface_android.h (right): > > http://codereview.appspot.com/6197074/diff/11001/include/ports/SkTypeface_android.h#newcode25 > ...
12 years, 1 month ago (2012-05-15 13:15:13 UTC) #10
zhenghao1
http://codereview.appspot.com/6197074/diff/11001/src/ports/SkFontHost_android.cpp File src/ports/SkFontHost_android.cpp (right): http://codereview.appspot.com/6197074/diff/11001/src/ports/SkFontHost_android.cpp#newcode992 src/ports/SkFontHost_android.cpp:992: gFamilyHeadAndNameListMutex.acquire(); There seems a deadlock here. When called into ...
12 years, 1 month ago (2012-05-15 13:18:13 UTC) #11
zhenghao1
http://codereview.appspot.com/6197074/diff/11001/src/ports/SkFontHost_android.cpp File src/ports/SkFontHost_android.cpp (right): http://codereview.appspot.com/6197074/diff/11001/src/ports/SkFontHost_android.cpp#newcode962 src/ports/SkFontHost_android.cpp:962: gFamilyHeadAndNameListMutex.acquire(); Same. Deadlock here. http://codereview.appspot.com/6197074/diff/11001/src/ports/SkFontHost_android.cpp#newcode973 src/ports/SkFontHost_android.cpp:973: SkAutoGlyphCache autoCache(paint, NULL); ...
12 years, 1 month ago (2012-05-15 14:02:22 UTC) #12
DerekS
sorry about that. I accidentally updated the CL with one of my experiments that I ...
12 years, 1 month ago (2012-05-15 14:25:17 UTC) #13
DerekS
On 2012/05/15 14:25:17, djsollen wrote: > sorry about that. I accidentally updated the CL with ...
12 years, 1 month ago (2012-05-15 15:05:28 UTC) #14
zhenghao1
ping?
12 years, 1 month ago (2012-05-22 03:25:04 UTC) #15
DerekS
The CL was updated with a fix, but I forgot to post a comment to ...
12 years, 1 month ago (2012-05-29 13:33:26 UTC) #16
Hao Zheng
The deadlock seems gone in my test. Some additional comments. http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h File include/ports/SkTypeface_android.h (right): http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h#newcode25 ...
12 years, 1 month ago (2012-05-30 12:07:25 UTC) #17
DerekS
I've uploaded a new patch that includes the additional fonts http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h File include/ports/SkTypeface_android.h (right): http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h#newcode25 ...
12 years, 1 month ago (2012-05-30 14:02:07 UTC) #18
Hao Zheng
http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h File include/ports/SkTypeface_android.h (right): http://codereview.appspot.com/6197074/diff/2006/include/ports/SkTypeface_android.h#newcode25 include/ports/SkTypeface_android.h:25: kTamilBold_FallbackScript, Thanks for adding these. New scripts render perfectly! ...
12 years, 1 month ago (2012-05-31 09:06:10 UTC) #19
DerekS
I've updated the comments and removed the reset function. I'll hold off until tomorrow morning ...
12 years, 1 month ago (2012-05-31 20:35:08 UTC) #20
Hao Zheng
12 years, 1 month ago (2012-06-01 08:37:38 UTC) #21
lgtm
Thanks! I have verified it works for me.

http://codereview.appspot.com/6197074/diff/23004/src/ports/SkFontHost_android...
File src/ports/SkFontHost_android.cpp (right):

http://codereview.appspot.com/6197074/diff/23004/src/ports/SkFontHost_android...
src/ports/SkFontHost_android.cpp:984: 
Nit: empty line.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b