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

Side by Side Diff: src/core/SkGlyph.h

Issue 834103004: Remove distance field generation and storage from SkGlyphCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkGlyph_DEFINED 8 #ifndef SkGlyph_DEFINED
9 #define SkGlyph_DEFINED 9 #define SkGlyph_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 struct SkGlyph { 23 struct SkGlyph {
24 void* fImage; 24 void* fImage;
25 SkPath* fPath; 25 SkPath* fPath;
26 SkFixed fAdvanceX, fAdvanceY; 26 SkFixed fAdvanceX, fAdvanceY;
27 27
28 uint32_t fID; 28 uint32_t fID;
29 uint16_t fWidth, fHeight; 29 uint16_t fWidth, fHeight;
30 int16_t fTop, fLeft; 30 int16_t fTop, fLeft;
31 31
32 void* fDistanceField;
33 uint8_t fMaskFormat; 32 uint8_t fMaskFormat;
34 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning 33 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning
35 int8_t fForceBW; 34 int8_t fForceBW;
36 35
37 void init(uint32_t id) { 36 void init(uint32_t id) {
38 fID = id; 37 fID = id;
39 fImage = NULL; 38 fImage = NULL;
40 fPath = NULL; 39 fPath = NULL;
41 fDistanceField = NULL;
42 fMaskFormat = MASK_FORMAT_UNKNOWN; 40 fMaskFormat = MASK_FORMAT_UNKNOWN;
43 fForceBW = 0; 41 fForceBW = 0;
44 } 42 }
45 43
46 /** 44 /**
47 * Compute the rowbytes for the specified width and mask-format. 45 * Compute the rowbytes for the specified width and mask-format.
48 */ 46 */
49 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) { 47 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) {
50 unsigned rb = width; 48 unsigned rb = width;
51 if (SkMask::kBW_Format == format) { 49 if (SkMask::kBW_Format == format) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 y = FixedToSub(y); 135 y = FixedToSub(y);
138 return (x << (kSubShift + kSubShiftX)) | 136 return (x << (kSubShift + kSubShiftX)) |
139 (y << (kSubShift + kSubShiftY)) | 137 (y << (kSubShift + kSubShiftY)) |
140 code; 138 code;
141 } 139 }
142 140
143 void toMask(SkMask* mask) const; 141 void toMask(SkMask* mask) const;
144 }; 142 };
145 143
146 #endif 144 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698