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

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

Issue 737093002: Stop overloading internal_dispose in SkTextBlob and SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ARGGGGGGHHHH Created 6 years, 1 month 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/SkData.h ('k') | src/core/SkData.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 private: 72 private:
73 const RunRecord* fCurrentRun; 73 const RunRecord* fCurrentRun;
74 int fRemainingRuns; 74 int fRemainingRuns;
75 75
76 SkDEBUGCODE(uint8_t* fStorageTop;) 76 SkDEBUGCODE(uint8_t* fStorageTop;)
77 }; 77 };
78 78
79 SkTextBlob(int runCount, const SkRect& bounds); 79 SkTextBlob(int runCount, const SkRect& bounds);
80 80
81 virtual ~SkTextBlob(); 81 virtual ~SkTextBlob();
82 virtual void internal_dispose() const SK_OVERRIDE; 82
83 // Memory for objects of this class is created with sk_malloc rather than op erator new and must
84 // be freed with sk_free.
85 void operator delete(void* p) { sk_free(p); }
86 void* operator new(size_t) {
87 SkFAIL("All blobs are created by placement new.");
88 return sk_malloc_throw(0);
89 }
90 void* operator new(size_t, void* p) { return p; }
83 91
84 static unsigned ScalarsPerGlyph(GlyphPositioning pos); 92 static unsigned ScalarsPerGlyph(GlyphPositioning pos);
85 93
86 friend class SkBaseDevice; 94 friend class SkBaseDevice;
87 friend class SkTextBlobBuilder; 95 friend class SkTextBlobBuilder;
88 friend class TextBlobTester; 96 friend class TextBlobTester;
89 97
90 const int fRunCount; 98 const int fRunCount;
91 const SkRect fBounds; 99 const SkRect fBounds;
92 mutable uint32_t fUniqueID; 100 mutable uint32_t fUniqueID;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 194
187 SkRect fBounds; 195 SkRect fBounds;
188 int fRunCount; 196 int fRunCount;
189 bool fDeferredBounds; 197 bool fDeferredBounds;
190 size_t fLastRun; // index into fStorage 198 size_t fLastRun; // index into fStorage
191 199
192 RunBuffer fCurrentRunBuffer; 200 RunBuffer fCurrentRunBuffer;
193 }; 201 };
194 202
195 #endif // SkTextBlob_DEFINED 203 #endif // SkTextBlob_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkData.h ('k') | src/core/SkData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698