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

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

Issue 1031423002: Add mixedtextblob gm and a simple bench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mac warnings Created 5 years, 8 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 | « gyp/gmslides.gypi ('k') | src/gpu/GrAtlasTextContext.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 2015 Google Inc. 2 * Copyright 2015 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 GrAtlasTextContext_DEFINED 8 #ifndef GrAtlasTextContext_DEFINED
9 #define GrAtlasTextContext_DEFINED 9 #define GrAtlasTextContext_DEFINED
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ::operator delete(target, placement); 135 ::operator delete(target, placement);
136 } 136 }
137 }; 137 };
138 138
139 typedef BitmapTextBlob::Run Run; 139 typedef BitmapTextBlob::Run Run;
140 typedef Run::SubRunInfo PerSubRunInfo; 140 typedef Run::SubRunInfo PerSubRunInfo;
141 141
142 BitmapTextBlob* CreateBlob(int glyphCount, int runCount); 142 BitmapTextBlob* CreateBlob(int glyphCount, int runCount);
143 143
144 void appendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, int left, int top, 144 void appendGlyph(BitmapTextBlob*, int runIndex, GrGlyph::PackedID, int left, int top,
145 GrFontScaler*, const SkIRect& clipRect); 145 GrColor color, GrFontScaler*, const SkIRect& clipRect);
146 void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const GrPaint&, const GrClip&, 146 void flush(GrDrawTarget*, BitmapTextBlob*, GrRenderTarget*, const GrPaint&, const GrClip&,
147 const SkMatrix& viewMatrix, int paintAlpha); 147 const SkMatrix& viewMatrix, int paintAlpha);
148 148
149 void internalDrawText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const Sk Paint&, 149 void internalDrawText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const Sk Paint&,
150 const SkMatrix& viewMatrix, const char text[], size_t byteLength, 150 const SkMatrix& viewMatrix, const char text[], size_t byteLength,
151 SkScalar x, SkScalar y, const SkIRect& clipRect); 151 SkScalar x, SkScalar y, const SkIRect& clipRect);
152 void internalDrawPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&, 152 void internalDrawPosText(BitmapTextBlob*, int runIndex, SkGlyphCache*, const SkPaint&,
153 const SkMatrix& viewMatrix, 153 const SkMatrix& viewMatrix,
154 const char text[], size_t byteLength, 154 const char text[], size_t byteLength,
155 const SkScalar pos[], int scalarsPerPosition, 155 const SkScalar pos[], int scalarsPerPosition,
(...skipping 17 matching lines...) Expand all
173 // TODO use real cache 173 // TODO use real cache
174 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); 174 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**);
175 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; 175 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache;
176 176
177 friend class BitmapTextBatch; 177 friend class BitmapTextBatch;
178 178
179 typedef GrTextContext INHERITED; 179 typedef GrTextContext INHERITED;
180 }; 180 };
181 181
182 #endif 182 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698