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

Side by Side Diff: include/core/SkTextBlob.h

Issue 1036613002: simple patch to always init SkTextBlob uniqueID (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 9 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/SkTextBlob.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 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 SkTextBlob_DEFINED 8 #ifndef SkTextBlob_DEFINED
9 #define SkTextBlob_DEFINED 9 #define SkTextBlob_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 class SK_API SkTextBlob : public SkRefCnt { 23 class SK_API SkTextBlob : public SkRefCnt {
24 public: 24 public:
25 /** 25 /**
26 * Returns a conservative blob bounding box. 26 * Returns a conservative blob bounding box.
27 */ 27 */
28 const SkRect& bounds() const { return fBounds; } 28 const SkRect& bounds() const { return fBounds; }
29 29
30 /** 30 /**
31 * Return a non-zero, unique value representing the text blob. 31 * Return a non-zero, unique value representing the text blob.
32 */ 32 */
33 uint32_t uniqueID() const; 33 uint32_t uniqueID() const { return fUniqueID; }
34 34
35 /** 35 /**
36 * Serialize to a buffer. 36 * Serialize to a buffer.
37 */ 37 */
38 void flatten(SkWriteBuffer&) const; 38 void flatten(SkWriteBuffer&) const;
39 39
40 /** 40 /**
41 * Recreate an SkTextBlob that was serialized into a buffer. 41 * Recreate an SkTextBlob that was serialized into a buffer.
42 * 42 *
43 * @param SkReadBuffer Serialized blob data. 43 * @param SkReadBuffer Serialized blob data.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 static unsigned ScalarsPerGlyph(GlyphPositioning pos); 92 static unsigned ScalarsPerGlyph(GlyphPositioning pos);
93 93
94 friend class GrTextContext; 94 friend class GrTextContext;
95 friend class SkBaseDevice; 95 friend class SkBaseDevice;
96 friend class SkTextBlobBuilder; 96 friend class SkTextBlobBuilder;
97 friend class TextBlobTester; 97 friend class TextBlobTester;
98 98
99 const int fRunCount; 99 const int fRunCount;
100 const SkRect fBounds; 100 const SkRect fBounds;
101 mutable uint32_t fUniqueID; 101 const uint32_t fUniqueID;
102 102
103 SkDEBUGCODE(size_t fStorageSize;) 103 SkDEBUGCODE(size_t fStorageSize;)
104 104
105 // The actual payload resides in externally-managed storage, following the o bject. 105 // The actual payload resides in externally-managed storage, following the o bject.
106 // (see the .cpp for more details) 106 // (see the .cpp for more details)
107 107
108 typedef SkRefCnt INHERITED; 108 typedef SkRefCnt INHERITED;
109 }; 109 };
110 110
111 /** \class SkTextBlobBuilder 111 /** \class SkTextBlobBuilder
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 SkRect fBounds; 199 SkRect fBounds;
200 int fRunCount; 200 int fRunCount;
201 bool fDeferredBounds; 201 bool fDeferredBounds;
202 size_t fLastRun; // index into fStorage 202 size_t fLastRun; // index into fStorage
203 203
204 RunBuffer fCurrentRunBuffer; 204 RunBuffer fCurrentRunBuffer;
205 }; 205 };
206 206
207 #endif // SkTextBlob_DEFINED 207 #endif // SkTextBlob_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698