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

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

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/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchAtlas.cpp » ('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 #ifndef GrBatchAtlas_DEFINED 8 #ifndef GrBatchAtlas_DEFINED
9 #define GrBatchAtlas_DEFINED 9 #define GrBatchAtlas_DEFINED
10 10
(...skipping 28 matching lines...) Expand all
39 // A function pointer for use as a callback during eviction. Whenever GrBat chAtlas evicts a 39 // A function pointer for use as a callback during eviction. Whenever GrBat chAtlas evicts a
40 // specific AtlasID, it will call all of the registered listeners so they ca n optionally process 40 // specific AtlasID, it will call all of the registered listeners so they ca n optionally process
41 // the eviction 41 // the eviction
42 typedef void (*EvictionFunc)(GrBatchAtlas::AtlasID, void*); 42 typedef void (*EvictionFunc)(GrBatchAtlas::AtlasID, void*);
43 43
44 GrBatchAtlas(GrTexture*, int numPlotsX, int numPlotsY); 44 GrBatchAtlas(GrTexture*, int numPlotsX, int numPlotsY);
45 ~GrBatchAtlas(); 45 ~GrBatchAtlas();
46 46
47 // Adds a width x height subimage to the atlas. Upon success it returns 47 // Adds a width x height subimage to the atlas. Upon success it returns
48 // the containing GrPlot and absolute location in the backing texture. 48 // the containing GrPlot and absolute location in the backing texture.
49 // NULL is returned if the subimage cannot fit in the atlas. 49 // nullptr is returned if the subimage cannot fit in the atlas.
50 // If provided, the image data will be written to the CPU-side backing bitma p. 50 // If provided, the image data will be written to the CPU-side backing bitma p.
51 // NOTE: If the client intends to refer to the atlas, they should immediatel y call 'setUseToken' 51 // NOTE: If the client intends to refer to the atlas, they should immediatel y call 'setUseToken'
52 // with the currentToken from the batch target, otherwise the next call to a ddToAtlas might 52 // with the currentToken from the batch target, otherwise the next call to a ddToAtlas might
53 // cause an eviction 53 // cause an eviction
54 bool addToAtlas(AtlasID*, GrDrawBatch::Target*, int width, int height, const void* image, 54 bool addToAtlas(AtlasID*, GrDrawBatch::Target*, int width, int height, const void* image,
55 SkIPoint16* loc); 55 SkIPoint16* loc);
56 56
57 GrTexture* getTexture() const { return fTexture; } 57 GrTexture* getTexture() const { return fTexture; }
58 58
59 uint64_t atlasGeneration() const { return fAtlasGeneration; } 59 uint64_t atlasGeneration() const { return fAtlasGeneration; }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 }; 149 };
150 150
151 SkTDArray<EvictionData> fEvictionCallbacks; 151 SkTDArray<EvictionData> fEvictionCallbacks;
152 // allocated array of GrBatchPlots 152 // allocated array of GrBatchPlots
153 SkAutoTUnref<BatchPlot>* fPlotArray; 153 SkAutoTUnref<BatchPlot>* fPlotArray;
154 // LRU list of GrPlots (MRU at head - LRU at tail) 154 // LRU list of GrPlots (MRU at head - LRU at tail)
155 GrBatchPlotList fPlotList; 155 GrBatchPlotList fPlotList;
156 }; 156 };
157 157
158 #endif 158 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698