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

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

Issue 1468483002: Add SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkStrokeRec Created 5 years 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 | « include/core/SkTypes.h ('k') | no next file » | 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
11 #include "SkChecksum.h" 11 #include "SkChecksum.h"
12 #include "SkTypes.h" 12 #include "SkTypes.h"
13 #include "SkFixed.h" 13 #include "SkFixed.h"
14 #include "SkMask.h" 14 #include "SkMask.h"
15 15
16 class SkPath; 16 class SkPath;
17 class SkGlyphCache; 17 class SkGlyphCache;
18 18
19 // needs to be != to any valid SkMask::Format 19 // needs to be != to any valid SkMask::Format
20 #define MASK_FORMAT_UNKNOWN (0xFF) 20 #define MASK_FORMAT_UNKNOWN (0xFF)
21 #define MASK_FORMAT_JUST_ADVANCE MASK_FORMAT_UNKNOWN 21 #define MASK_FORMAT_JUST_ADVANCE MASK_FORMAT_UNKNOWN
22 22
23 #define kMaxGlyphWidth (1<<13) 23 #define kMaxGlyphWidth (1<<13)
24 24
25 SK_BEGIN_REQUIRE_DENSE
25 class SkGlyph { 26 class SkGlyph {
26 enum { 27 enum {
27 kSubBits = 2, 28 kSubBits = 2,
28 kSubMask = ((1 << kSubBits) - 1), 29 kSubMask = ((1 << kSubBits) - 1),
29 kSubShift = 24, // must be large enough for glyphs and unichars 30 kSubShift = 24, // must be large enough for glyphs and unichars
30 kCodeMask = ((1 << kSubShift) - 1), 31 kCodeMask = ((1 << kSubShift) - 1),
31 // relative offsets for X and Y subpixel bits 32 // relative offsets for X and Y subpixel bits
32 kSubShiftX = kSubBits, 33 kSubShiftX = kSubBits,
33 kSubShiftY = 0 34 kSubShiftY = 0
34 }; 35 };
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return ID; 176 return ID;
176 } 177 }
177 178
178 // FIXME - This is needed because the Android frame work directly 179 // FIXME - This is needed because the Android frame work directly
179 // accesses fID. Remove when fID accesses are cleaned up. 180 // accesses fID. Remove when fID accesses are cleaned up.
180 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 181 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
181 public: 182 public:
182 #endif 183 #endif
183 uint32_t fID; 184 uint32_t fID;
184 }; 185 };
186 SK_END_REQUIRE_DENSE
185 187
186 #endif 188 #endif
OLDNEW
« no previous file with comments | « include/core/SkTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698