aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-03-12 16:02:29 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-14 02:12:42 +0000
commitba321b601782b4dd7cd060506dcc222ccdaac408 (patch)
tree772434d5ca67d1fc37dcc63ef5bc266b3a992ff1 /src/core/SkScalerContext.cpp
parentcefa808f3f237434139ce5fbbbbaf34cbc90e368 (diff)
Cleanup size calculations in SkGlyph
BUG=skia:7515 Change-Id: Ie9d255a93ecff86ce018f8510332bdb280ec575e Reviewed-on: https://skia-review.googlesource.com/113863 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 6d5984abdf..b8778282e2 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -29,37 +29,6 @@
#include "SkTextFormatParams.h"
#include "SkWriteBuffer.h"
-void SkGlyph::toMask(SkMask* mask) const {
- SkASSERT(mask);
-
- mask->fImage = (uint8_t*)fImage;
- mask->fBounds.set(fLeft, fTop, fLeft + fWidth, fTop + fHeight);
- mask->fRowBytes = this->rowBytes();
- mask->fFormat = static_cast<SkMask::Format>(fMaskFormat);
-}
-
-size_t SkGlyph::computeImageSize() const {
- const size_t size = this->rowBytes() * fHeight;
-
- switch (fMaskFormat) {
- case SkMask::k3D_Format:
- return 3 * size;
- default:
- return size;
- }
-}
-
-void SkGlyph::zeroMetrics() {
- fAdvanceX = 0;
- fAdvanceY = 0;
- fWidth = 0;
- fHeight = 0;
- fTop = 0;
- fLeft = 0;
- fRsbDelta = 0;
- fLsbDelta = 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
#ifdef SK_DEBUG