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

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

Issue 1092973004: Pack BitmapTextBlob a bit tighter (Closed) Base URL: https://skia.googlesource.com/skia.git@atdfopt1
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/GrAtlasTextContext.h ('k') | no next file » | 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 GrBatchAtlas_DEFINED 8 #ifndef GrBatchAtlas_DEFINED
9 #define GrBatchAtlas_DEFINED 9 #define GrBatchAtlas_DEFINED
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } else { 95 } else {
96 // This case will almost never happen 96 // This case will almost never happen
97 fAllocated = fCount << 1; 97 fAllocated = fCount << 1;
98 fPlotsToUpdate.realloc(fAllocated); 98 fPlotsToUpdate.realloc(fAllocated);
99 fPlotsToUpdate[fCount++] = index; 99 fPlotsToUpdate[fCount++] = index;
100 } 100 }
101 } 101 }
102 102
103 static const int kMinItems = 4; 103 static const int kMinItems = 4;
104 static const int kMaxPlots = 32; 104 static const int kMaxPlots = 32;
105 SkAutoSTMalloc<kMinItems, int> fPlotsToUpdate;
105 uint32_t fPlotAlreadyUpdated; 106 uint32_t fPlotAlreadyUpdated;
106 SkAutoSTMalloc<kMinItems, int> fPlotsToUpdate;
107 int fCount; 107 int fCount;
108 int fAllocated; 108 int fAllocated;
109 109
110 friend class GrBatchAtlas; 110 friend class GrBatchAtlas;
111 }; 111 };
112 112
113 void setLastUseTokenBulk(const BulkUseTokenUpdater& reffer, BatchToken); 113 void setLastUseTokenBulk(const BulkUseTokenUpdater& reffer, BatchToken);
114 114
115 private: 115 private:
116 static int GetIndexFromID(AtlasID id) { 116 static int GetIndexFromID(AtlasID id) {
(...skipping 24 matching lines...) Expand all
141 }; 141 };
142 142
143 SkTDArray<EvictionData> fEvictionCallbacks; 143 SkTDArray<EvictionData> fEvictionCallbacks;
144 // allocated array of GrBatchPlots 144 // allocated array of GrBatchPlots
145 SkAutoTUnref<BatchPlot>* fPlotArray; 145 SkAutoTUnref<BatchPlot>* fPlotArray;
146 // LRU list of GrPlots (MRU at head - LRU at tail) 146 // LRU list of GrPlots (MRU at head - LRU at tail)
147 GrBatchPlotList fPlotList; 147 GrBatchPlotList fPlotList;
148 }; 148 };
149 149
150 #endif 150 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698