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

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

Issue 1050113004: Adding bulk plot reffer to cached textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@atlastext
Patch Set: rebase 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 | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('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
11 #include "GrTextContext.h" 11 #include "GrTextContext.h"
12 12
13 #include "GrBatchAtlas.h"
13 #include "GrGeometryProcessor.h" 14 #include "GrGeometryProcessor.h"
14 #include "SkDescriptor.h" 15 #include "SkDescriptor.h"
15 #include "SkTextBlob.h" 16 #include "SkTextBlob.h"
16 #include "SkTHash.h" 17 #include "SkTHash.h"
17 18
18 class GrBatchTextStrike; 19 class GrBatchTextStrike;
19 class GrPipelineBuilder; 20 class GrPipelineBuilder;
20 21
21 /* 22 /*
22 * This class implements GrTextContext using standard bitmap fonts, and can also process textblobs. 23 * This class implements GrTextContext using standard bitmap fonts, and can also process textblobs.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 , fGlyphStartIndex(0) 97 , fGlyphStartIndex(0)
97 , fGlyphEndIndex(0) 98 , fGlyphEndIndex(0)
98 , fVertexStartIndex(0) 99 , fVertexStartIndex(0)
99 , fVertexEndIndex(0) {} 100 , fVertexEndIndex(0) {}
100 GrMaskFormat fMaskFormat; 101 GrMaskFormat fMaskFormat;
101 uint64_t fAtlasGeneration; 102 uint64_t fAtlasGeneration;
102 uint32_t fGlyphStartIndex; 103 uint32_t fGlyphStartIndex;
103 uint32_t fGlyphEndIndex; 104 uint32_t fGlyphEndIndex;
104 size_t fVertexStartIndex; 105 size_t fVertexStartIndex;
105 size_t fVertexEndIndex; 106 size_t fVertexEndIndex;
107 GrBatchAtlas::BulkUseTokenUpdater fBulkUseToken;
106 }; 108 };
107 SkSTArray<1, SubRunInfo, true> fSubRunInfo; 109 SkSTArray<1, SubRunInfo, true> fSubRunInfo;
108 SkAutoDescriptor fDescriptor; 110 SkAutoDescriptor fDescriptor;
109 SkAutoTUnref<SkTypeface> fTypeface; 111 SkAutoTUnref<SkTypeface> fTypeface;
110 SkRect fVertexBounds; 112 SkRect fVertexBounds;
111 GrColor fColor; 113 GrColor fColor;
112 bool fInitialized; 114 bool fInitialized;
113 bool fDrawAsPaths; 115 bool fDrawAsPaths;
114 }; 116 };
115 117
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // TODO use real cache 200 // TODO use real cache
199 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**); 201 static void ClearCacheEntry(uint32_t key, BitmapTextBlob**);
200 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache; 202 SkTHashMap<uint32_t, BitmapTextBlob*, BitmapTextBlob::Hash> fCache;
201 203
202 friend class BitmapTextBatch; 204 friend class BitmapTextBatch;
203 205
204 typedef GrTextContext INHERITED; 206 typedef GrTextContext INHERITED;
205 }; 207 };
206 208
207 #endif 209 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698