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

Side by Side Diff: include/gpu/GrGlyph.h

Issue 309683002: Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 6 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 | « include/gpu/GrContext.h ('k') | include/gpu/GrPoint.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 2010 Google Inc. 2 * Copyright 2010 Google Inc.
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 GrGlyph_DEFINED 8 #ifndef GrGlyph_DEFINED
9 #define GrGlyph_DEFINED 9 #define GrGlyph_DEFINED
10 10
11 #include "GrRect.h" 11 #include "GrRect.h"
12 #include "SkPath.h" 12 #include "SkPath.h"
13 13
14 class GrPlot; 14 class GrPlot;
15 15
16 /* Need this to be quad-state: 16 /* Need this to be quad-state:
17 - complete w/ image 17 - complete w/ image
18 - just metrics 18 - just metrics
19 - failed to get image, but has metrics 19 - failed to get image, but has metrics
20 - failed to get metrics 20 - failed to get metrics
21 */ 21 */
22 struct GrGlyph { 22 struct GrGlyph {
23 typedef uint32_t PackedID; 23 typedef uint32_t PackedID;
24 24
25 GrPlot* fPlot; 25 GrPlot* fPlot;
26 SkPath* fPath; 26 SkPath* fPath;
27 PackedID fPackedID; 27 PackedID fPackedID;
28 GrIRect16 fBounds; 28 GrIRect16 fBounds;
29 GrIPoint16 fAtlasLocation; 29 SkIPoint16 fAtlasLocation;
30 30
31 void init(GrGlyph::PackedID packed, const SkIRect& bounds) { 31 void init(GrGlyph::PackedID packed, const SkIRect& bounds) {
32 fPlot = NULL; 32 fPlot = NULL;
33 fPath = NULL; 33 fPath = NULL;
34 fPackedID = packed; 34 fPackedID = packed;
35 fBounds.set(bounds); 35 fBounds.set(bounds);
36 fAtlasLocation.set(0, 0); 36 fAtlasLocation.set(0, 0);
37 } 37 }
38 38
39 void free() { 39 void free() {
(...skipping 29 matching lines...) Expand all
69 return ((packed >> 16) & 3) << 14; 69 return ((packed >> 16) & 3) << 14;
70 } 70 }
71 71
72 static inline uint16_t UnpackID(PackedID packed) { 72 static inline uint16_t UnpackID(PackedID packed) {
73 return (uint16_t)packed; 73 return (uint16_t)packed;
74 } 74 }
75 }; 75 };
76 76
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698