Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1233)

Unified Diff: third_party/harfbuzz-ng/src/hb-open-type-private.hh

Issue 70193010: Update harfbuzz-ng to 0.9.24 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-old.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-head-table.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-open-type-private.hh
diff --git a/third_party/harfbuzz-ng/src/hb-open-type-private.hh b/third_party/harfbuzz-ng/src/hb-open-type-private.hh
index 6a8b98be6840c2bc6e141c353c70966f9ecfa726..ee3a21dc3b168a70bdc51241d3d8046686a50336 100644
--- a/third_party/harfbuzz-ng/src/hb-open-type-private.hh
+++ b/third_party/harfbuzz-ng/src/hb-open-type-private.hh
@@ -642,15 +642,21 @@ struct LongOffset : ULONG
/* CheckSum */
struct CheckSum : ULONG
{
- static uint32_t CalcTableChecksum (ULONG *Table, uint32_t Length)
+ /* This is reference implementation from the spec. */
+ static inline uint32_t CalcTableChecksum (const ULONG *Table, uint32_t Length)
{
uint32_t Sum = 0L;
- ULONG *EndPtr = Table+((Length+3) & ~3) / ULONG::static_size;
+ const ULONG *EndPtr = Table+((Length+3) & ~3) / ULONG::static_size;
while (Table < EndPtr)
Sum += *Table++;
return Sum;
}
+
+ /* Note: data should be 4byte aligned and have 4byte padding at the end. */
+ inline void set_for_data (const void *data, unsigned int length)
+ { set (CalcTableChecksum ((const ULONG *) data, length)); }
+
public:
DEFINE_SIZE_STATIC (4);
};
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-old.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-head-table.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698