diff options
author | Herb Derby <herb@google.com> | 2018-03-14 11:59:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-14 17:26:11 +0000 |
commit | c29c76aae518a9c368248063e84a96ffe8c75b90 (patch) | |
tree | 60e08d1575b67c2b7baeaa49c6c7952f1f43b230 | |
parent | 4f57eb8002a0488cfbf08717b25af93fae37a39a (diff) |
Experiment: relax 4 byte alignment for glyph images
This experiment remove the need for rowbytes to be
4 byte aligned in width. This causes waste in data
transfer between the Renderer and GPU process.
BUG=skia:7515
Change-Id: Iad0383ee0adbacaa791bf4251325867e82fdbea1
Reviewed-on: https://skia-review.googlesource.com/114371
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
-rw-r--r-- | src/core/SkGlyph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkGlyph.cpp b/src/core/SkGlyph.cpp index 3b72ac5a96..3d9389ce4c 100644 --- a/src/core/SkGlyph.cpp +++ b/src/core/SkGlyph.cpp @@ -45,11 +45,11 @@ static size_t format_rowbytes(int width, SkMask::Format format) { return bits_to_bytes(width); case SkMask::kA8_Format: case SkMask::k3D_Format: - return SkAlign4(width); + return width; case SkMask::kARGB32_Format: return width * sizeof(uint32_t); case SkMask::kLCD16_Format: - return SkAlign4(width * sizeof(uint16_t)); + return width * sizeof(uint16_t); default: SK_ABORT("Unknown mask format."); break; |