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

Unified Diff: src/gpu/GrBatchAtlas.h

Issue 1065773005: Fix for segfault on destruction of BitmapTextBlob (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchAtlas.h
diff --git a/src/gpu/GrBatchAtlas.h b/src/gpu/GrBatchAtlas.h
index 2b85da1f7d7d2c3083323917d7b7dabedb02f213..7a89f7889cacc3faba711476d47212a0e1c1c47c 100644
--- a/src/gpu/GrBatchAtlas.h
+++ b/src/gpu/GrBatchAtlas.h
@@ -90,19 +90,12 @@ public:
void set(int index) {
SkASSERT(!this->find(index));
fPlotAlreadyUpdated = fPlotAlreadyUpdated | (1 << index);
- if (fCount < fAllocated) {
- fPlotsToUpdate[fCount++] = index;
- } else {
- // This case will almost never happen
- fAllocated = fCount << 1;
- fPlotsToUpdate.realloc(fAllocated);
- fPlotsToUpdate[fCount++] = index;
- }
+ fPlotsToUpdate.push_back(index);
}
static const int kMinItems = 4;
static const int kMaxPlots = 32;
- SkAutoSTMalloc<kMinItems, int> fPlotsToUpdate;
+ SkSTArray<kMinItems, int, true> fPlotsToUpdate;
uint32_t fPlotAlreadyUpdated;
int fCount;
int fAllocated;
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698