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

Issue 5577064: sfnt table definitions (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 10 months ago by bungeman
Modified:
10 years, 8 months ago
Reviewers:
thakis, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : Allow empty sequences; output correctly when typed enums not supported. #

Patch Set 3 : Pass enumType when needed. #

Patch Set 4 : Bring struct names into line. #

Total comments: 8

Patch Set 5 : Rename SK_SIZE to SK_SEQ_SIZE. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3891 lines, -1 line) Patch
A gyp/sfnt.gyp View 1 chunk +45 lines, -0 lines 0 comments Download
M include/config/SkUserConfig.h View 1 chunk +9 lines, -0 lines 0 comments Download
M include/core/SkEndian.h View 4 chunks +55 lines, -1 line 0 comments Download
A include/sfnt/SkIBMFamilyClass.h View 1 1 chunk +174 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTableTypes.h View 1 chunk +36 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2.h View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2_V0.h View 1 2 3 1 chunk +147 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2_V1.h View 1 2 3 1 chunk +517 lines, -0 lines 2 comments Download
A include/sfnt/SkOTTable_OS_2_V2.h View 1 2 3 1 chunk +539 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2_V3.h View 1 2 3 1 chunk +549 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2_V4.h View 1 2 3 1 chunk +584 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_OS_2_VA.h View 1 2 3 1 chunk +140 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_head.h View 1 2 3 1 chunk +143 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_hhea.h View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
A include/sfnt/SkOTTable_post.h View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
A include/sfnt/SkPanose.h View 1 1 chunk +639 lines, -0 lines 0 comments Download
A include/sfnt/SkPreprocessorSeq.h View 1 2 3 4 1 chunk +109 lines, -0 lines 0 comments Download
A include/sfnt/SkTypedEnum.h View 1 2 1 chunk +67 lines, -0 lines 0 comments Download

Messages

Total messages: 6
bungeman
The DirectWrite FontHost will need offsets into sfnt tables for font information. Because of the ...
12 years, 9 months ago (2012-01-30 22:19:58 UTC) #1
reed1
http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkIBMFamilyClass.h File include/sfnt/SkIBMFamilyClass.h (right): http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkIBMFamilyClass.h#newcode16 include/sfnt/SkIBMFamilyClass.h:16: struct SkIBMFamilyClass { SkOTIBMFamilyClass? http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkPanose.h File include/sfnt/SkPanose.h (right): http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkPanose.h#newcode15 ...
12 years, 9 months ago (2012-01-31 13:11:16 UTC) #2
bungeman
Some reasons and excuses: http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkIBMFamilyClass.h File include/sfnt/SkIBMFamilyClass.h (right): http://codereview.appspot.com/5577064/diff/3037/include/sfnt/SkIBMFamilyClass.h#newcode16 include/sfnt/SkIBMFamilyClass.h:16: struct SkIBMFamilyClass { On 2012/01/31 ...
12 years, 9 months ago (2012-01-31 19:55:43 UTC) #3
bungeman
Committed revision 3131.
12 years, 9 months ago (2012-02-02 19:16:27 UTC) #4
thakis
clang complains about this file: https://codereview.appspot.com/5577064/diff/11001/include/sfnt/SkOTTable_OS_2_V1.h File include/sfnt/SkOTTable_OS_2_V1.h (right): https://codereview.appspot.com/5577064/diff/11001/include/sfnt/SkOTTable_OS_2_V1.h#newcode294 include/sfnt/SkOTTable_OS_2_V1.h:294: static const SK_OT_ULONG GeneralPunctuationMask ...
10 years, 8 months ago (2014-03-10 22:35:18 UTC) #5
bungeman
10 years, 8 months ago (2014-03-10 23:13:55 UTC) #6
Message was sent while issue was closed.
On 2014/03/10 22:35:18, thakis wrote:
> clang complains about this file:
> 
>
https://codereview.appspot.com/5577064/diff/11001/include/sfnt/SkOTTable_OS_2...
> File include/sfnt/SkOTTable_OS_2_V1.h (right):
> 
>
https://codereview.appspot.com/5577064/diff/11001/include/sfnt/SkOTTable_OS_2...
> include/sfnt/SkOTTable_OS_2_V1.h:294: static const SK_OT_ULONG
> GeneralPunctuationMask = SkTEndian_SwapBE32(1 << 31);
> Shifting a 1 into a signed int is undefined behavior I think. Can you change
> this to "1u << 31"?
> 
>
https://codereview.appspot.com/5577064/diff/11001/include/sfnt/SkOTTable_OS_2...
> include/sfnt/SkOTTable_OS_2_V1.h:487: static const SK_OT_ULONG
> SymbolCharacterSetMask = SkTEndian_SwapBE32(1 << 31);
> (here too)

Hmmm... yep, this is undefined with 32bit signed ints. Should probably make it
clear that all of these are unsigned shifts (in all of these files).

Not often one gets comments on two year old closed reviews :-) Interestingly
KDevelop with the clang parser highlights this with a problem marker, actually
complaining that the negative value won't fit into the uint_32. Looking for "<<
31" it looks like SkFloat and SkFloatBits may also have issues with this.

I have opened skia issue 2285 for the remaining instances and
https://codereview.chromium.org/189093020/ for this.
Sign in to reply to this message.

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