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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 | « src/gpu/GrGeometryBuffer.h ('k') | src/gpu/GrGpu.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
(...skipping 23 matching lines...) Expand all
34 GrBatchAtlas::AtlasID fID; 34 GrBatchAtlas::AtlasID fID;
35 SkPath* fPath; 35 SkPath* fPath;
36 PackedID fPackedID; 36 PackedID fPackedID;
37 GrMaskFormat fMaskFormat; 37 GrMaskFormat fMaskFormat;
38 GrIRect16 fBounds; 38 GrIRect16 fBounds;
39 SkIPoint16 fAtlasLocation; 39 SkIPoint16 fAtlasLocation;
40 bool fTooLargeForAtlas; 40 bool fTooLargeForAtlas;
41 41
42 void init(GrGlyph::PackedID packed, const SkIRect& bounds, GrMaskFormat form at) { 42 void init(GrGlyph::PackedID packed, const SkIRect& bounds, GrMaskFormat form at) {
43 fID = GrBatchAtlas::kInvalidAtlasID; 43 fID = GrBatchAtlas::kInvalidAtlasID;
44 fPath = NULL; 44 fPath = nullptr;
45 fPackedID = packed; 45 fPackedID = packed;
46 fBounds.set(bounds); 46 fBounds.set(bounds);
47 fMaskFormat = format; 47 fMaskFormat = format;
48 fAtlasLocation.set(0, 0); 48 fAtlasLocation.set(0, 0);
49 fTooLargeForAtlas = GrBatchAtlas::GlyphTooLargeForAtlas(bounds.width(), bounds.height()); 49 fTooLargeForAtlas = GrBatchAtlas::GlyphTooLargeForAtlas(bounds.width(), bounds.height());
50 } 50 }
51 51
52 void free() { 52 void free() {
53 if (fPath) { 53 if (fPath) {
54 delete fPath; 54 delete fPath;
55 fPath = NULL; 55 fPath = nullptr;
56 } 56 }
57 } 57 }
58 58
59 int width() const { return fBounds.width(); } 59 int width() const { return fBounds.width(); }
60 int height() const { return fBounds.height(); } 60 int height() const { return fBounds.height(); }
61 bool isEmpty() const { return fBounds.isEmpty(); } 61 bool isEmpty() const { return fBounds.isEmpty(); }
62 uint16_t glyphID() const { return UnpackID(fPackedID); } 62 uint16_t glyphID() const { return UnpackID(fPackedID); }
63 63
64 /////////////////////////////////////////////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////////
65 65
(...skipping 28 matching lines...) Expand all
94 static inline const GrGlyph::PackedID& GetKey(const GrGlyph& glyph) { 94 static inline const GrGlyph::PackedID& GetKey(const GrGlyph& glyph) {
95 return glyph.fPackedID; 95 return glyph.fPackedID;
96 } 96 }
97 97
98 static inline uint32_t Hash(GrGlyph::PackedID key) { 98 static inline uint32_t Hash(GrGlyph::PackedID key) {
99 return SkChecksum::Mix(key); 99 return SkChecksum::Mix(key);
100 } 100 }
101 }; 101 };
102 102
103 #endif 103 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGeometryBuffer.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698