Reduce 4 byte from HarfBuzzRunGlyphData for Windows
This patch makes |HarfBuzzRunGlyphData| four byte smaller by omitting structure alignment padding to reduce memory usage for Windows. Note: Linux doesn't insert padding after |unit16_t|. In rude estimation, we can reduce: number_of_character_in_page × 4 byte per page. Example: https://en.wikipedia.org document.body.innerText.length = 9681 Thus, we can reduce 38,724 byte. Before this patch: +----------+----------+ +0 | utin16_t | padding | +----------+----------+ +4 | bit field | +----------+----------+ +8 | float advance | +----------+----------+ ... sizeof(HarfBuzzRunGlyphData)==20 After this patch: +----------+----------+ +0 | bit field | +----------+----------+ +4 | float advance | +----------+----------+ ... sizeof(HarfBuzzRunGlyphData)==16 Bug: 965564 Change-Id: I73cae1096d74168ead1e2e48251dc2d50597e7e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627832 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#662974}
Showing
Please register or sign in to comment