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

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

Issue 1257253005: Move strike to subrun in GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 4 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.cpp ('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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 /* 62 /*
63 * A class which can be handed back to GrBatchAtlas for updating in bulk las t use tokens. The 63 * A class which can be handed back to GrBatchAtlas for updating in bulk las t use tokens. The
64 * current max number of plots the GrBatchAtlas can handle is 32, if in the future this is 64 * current max number of plots the GrBatchAtlas can handle is 32, if in the future this is
65 * insufficient then we can move to a 64 bit int 65 * insufficient then we can move to a 64 bit int
66 */ 66 */
67 class BulkUseTokenUpdater { 67 class BulkUseTokenUpdater {
68 public: 68 public:
69 BulkUseTokenUpdater() : fPlotAlreadyUpdated(0) {} 69 BulkUseTokenUpdater() : fPlotAlreadyUpdated(0) {}
70 BulkUseTokenUpdater(const BulkUseTokenUpdater& that)
71 : fPlotsToUpdate(that.fPlotsToUpdate)
72 , fPlotAlreadyUpdated(that.fPlotAlreadyUpdated) {
73 }
74
70 void add(AtlasID id) { 75 void add(AtlasID id) {
71 int index = GrBatchAtlas::GetIndexFromID(id); 76 int index = GrBatchAtlas::GetIndexFromID(id);
72 if (!this->find(index)) { 77 if (!this->find(index)) {
73 this->set(index); 78 this->set(index);
74 } 79 }
75 } 80 }
76 81
77 void reset() { 82 void reset() {
78 fPlotsToUpdate.reset(); 83 fPlotsToUpdate.reset();
79 fPlotAlreadyUpdated = 0; 84 fPlotAlreadyUpdated = 0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 }; 141 };
137 142
138 SkTDArray<EvictionData> fEvictionCallbacks; 143 SkTDArray<EvictionData> fEvictionCallbacks;
139 // allocated array of GrBatchPlots 144 // allocated array of GrBatchPlots
140 SkAutoTUnref<BatchPlot>* fPlotArray; 145 SkAutoTUnref<BatchPlot>* fPlotArray;
141 // LRU list of GrPlots (MRU at head - LRU at tail) 146 // LRU list of GrPlots (MRU at head - LRU at tail)
142 GrBatchPlotList fPlotList; 147 GrBatchPlotList fPlotList;
143 }; 148 };
144 149
145 #endif 150 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698