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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/GrBatchAtlas.h ('k') | src/gpu/GrBatchFontCache.h » ('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 #include "GrBatchAtlas.h" 8 #include "GrBatchAtlas.h"
9 #include "GrBatchFlushState.h" 9 #include "GrBatchFlushState.h"
10 #include "GrRectanizer.h" 10 #include "GrRectanizer.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 uint32_t x() const { return fX; } 124 uint32_t x() const { return fX; }
125 uint32_t y() const { return fY; } 125 uint32_t y() const { return fY; }
126 126
127 private: 127 private:
128 BatchPlot() 128 BatchPlot()
129 : fLastUpload(0) 129 : fLastUpload(0)
130 , fLastUse(0) 130 , fLastUse(0)
131 , fIndex(-1) 131 , fIndex(-1)
132 , fGenID(-1) 132 , fGenID(-1)
133 , fID(0) 133 , fID(0)
134 , fData(NULL) 134 , fData(nullptr)
135 , fWidth(0) 135 , fWidth(0)
136 , fHeight(0) 136 , fHeight(0)
137 , fX(0) 137 , fX(0)
138 , fY(0) 138 , fY(0)
139 , fTexture(NULL) 139 , fTexture(nullptr)
140 , fRects(NULL) 140 , fRects(nullptr)
141 , fAtlas(NULL) 141 , fAtlas(nullptr)
142 , fBytesPerPixel(1) 142 , fBytesPerPixel(1)
143 #ifdef SK_DEBUG 143 #ifdef SK_DEBUG
144 , fDirty(false) 144 , fDirty(false)
145 #endif 145 #endif
146 { 146 {
147 fOffset.set(0, 0); 147 fOffset.set(0, 0);
148 } 148 }
149 149
150 ~BatchPlot() { 150 ~BatchPlot() {
151 sk_free(fData); 151 sk_free(fData);
152 fData = NULL; 152 fData = nullptr;
153 delete fRects; 153 delete fRects;
154 } 154 }
155 155
156 void init(GrBatchAtlas* atlas, GrTexture* texture, int index, uint64_t gener ation, 156 void init(GrBatchAtlas* atlas, GrTexture* texture, int index, uint64_t gener ation,
157 int offX, int offY, int width, int height, size_t bpp) { 157 int offX, int offY, int width, int height, size_t bpp) {
158 fIndex = index; 158 fIndex = index;
159 fGenID = generation; 159 fGenID = generation;
160 fID = create_id(index, generation); 160 fID = create_id(index, generation);
161 fWidth = width; 161 fWidth = width;
162 fHeight = height; 162 fHeight = height;
163 fX = offX; 163 fX = offX;
164 fY = offY; 164 fY = offY;
165 fRects = GrRectanizer::Factory(width, height); 165 fRects = GrRectanizer::Factory(width, height);
166 fAtlas = atlas; 166 fAtlas = atlas;
167 fOffset.set(offX * width, offY * height); 167 fOffset.set(offX * width, offY * height);
168 fBytesPerPixel = bpp; 168 fBytesPerPixel = bpp;
169 fData = NULL; 169 fData = nullptr;
170 fDirtyRect.setEmpty(); 170 fDirtyRect.setEmpty();
171 SkDEBUGCODE(fDirty = false;) 171 SkDEBUGCODE(fDirty = false;)
172 fTexture = texture; 172 fTexture = texture;
173 } 173 }
174 174
175 GrBatchToken fLastUpload; 175 GrBatchToken fLastUpload;
176 GrBatchToken fLastUse; 176 GrBatchToken fLastUse;
177 177
178 uint32_t fIndex; 178 uint32_t fIndex;
179 uint64_t fGenID; 179 uint64_t fGenID;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater, 370 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater,
371 GrBatchToken batchToken) { 371 GrBatchToken batchToken) {
372 int count = updater.fPlotsToUpdate.count(); 372 int count = updater.fPlotsToUpdate.count();
373 for (int i = 0; i < count; i++) { 373 for (int i = 0; i < count; i++) {
374 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]]; 374 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]];
375 this->makeMRU(plot); 375 this->makeMRU(plot);
376 plot->setLastUseToken(batchToken); 376 plot->setLastUseToken(batchToken);
377 } 377 }
378 } 378 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchAtlas.h ('k') | src/gpu/GrBatchFontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698