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

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

Issue 1056383005: fix for GrBatchAtlas valgrind error (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | 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 #include "GrBatchAtlas.h" 8 #include "GrBatchAtlas.h"
9 #include "GrBatchTarget.h" 9 #include "GrBatchTarget.h"
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 , fAtlas(NULL) 140 , fAtlas(NULL)
141 , fBytesPerPixel(1) 141 , fBytesPerPixel(1)
142 #ifdef SK_DEBUG 142 #ifdef SK_DEBUG
143 , fDirty(false) 143 , fDirty(false)
144 #endif 144 #endif
145 { 145 {
146 fOffset.set(0, 0); 146 fOffset.set(0, 0);
147 } 147 }
148 148
149 ~BatchPlot() { 149 ~BatchPlot() {
150 SkDELETE_ARRAY(fData); 150 sk_free(fData);
151 fData = NULL; 151 fData = NULL;
152 delete fRects; 152 delete fRects;
153 } 153 }
154 154
155 void init(GrBatchAtlas* atlas, GrTexture* texture, int index, uint32_t gener ation, 155 void init(GrBatchAtlas* atlas, GrTexture* texture, int index, uint32_t gener ation,
156 int offX, int offY, int width, int height, size_t bpp) { 156 int offX, int offY, int width, int height, size_t bpp) {
157 fIndex = index; 157 fIndex = index;
158 fGenID = generation; 158 fGenID = generation;
159 fID = create_id(index, generation); 159 fID = create_id(index, generation);
160 fWidth = width; 160 fWidth = width;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater, Batch Token batchToken) { 367 void GrBatchAtlas::setLastUseTokenBulk(const BulkUseTokenUpdater& updater, Batch Token batchToken) {
368 int count = updater.fPlotsToUpdate.count(); 368 int count = updater.fPlotsToUpdate.count();
369 for (int i = 0; i < count; i++) { 369 for (int i = 0; i < count; i++) {
370 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]]; 370 BatchPlot* plot = fPlotArray[updater.fPlotsToUpdate[i]];
371 this->makeMRU(plot); 371 this->makeMRU(plot);
372 plot->setLastUseToken(batchToken); 372 plot->setLastUseToken(batchToken);
373 } 373 }
374 } 374 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698