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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAtlas.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrAtlas_DEFINED 9 #ifndef GrAtlas_DEFINED
10 #define GrAtlas_DEFINED 10 #define GrAtlas_DEFINED
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return fPlots.contains(const_cast<GrPlot*>(plot)); 86 return fPlots.contains(const_cast<GrPlot*>(plot));
87 } 87 }
88 #endif 88 #endif
89 89
90 private: 90 private:
91 SkTDArray<GrPlot*> fPlots; 91 SkTDArray<GrPlot*> fPlots;
92 92
93 friend class GrAtlas; 93 friend class GrAtlas;
94 }; 94 };
95 95
96 GrAtlas(GrGpu*, GrPixelConfig, GrTextureFlags flags, 96 GrAtlas(GrGpu*, GrPixelConfig, GrSurfaceFlags flags,
97 const SkISize& backingTextureSize, 97 const SkISize& backingTextureSize,
98 int numPlotsX, int numPlotsY, bool batchUploads); 98 int numPlotsX, int numPlotsY, bool batchUploads);
99 ~GrAtlas(); 99 ~GrAtlas();
100 100
101 // Adds a width x height subimage to the atlas. Upon success it returns 101 // Adds a width x height subimage to the atlas. Upon success it returns
102 // the containing GrPlot and absolute location in the backing texture. 102 // the containing GrPlot and absolute location in the backing texture.
103 // NULL is returned if the subimage cannot fit in the atlas. 103 // NULL is returned if the subimage cannot fit in the atlas.
104 // If provided, the image data will either be immediately uploaded or 104 // If provided, the image data will either be immediately uploaded or
105 // written to the CPU-side backing bitmap. 105 // written to the CPU-side backing bitmap.
106 GrPlot* addToAtlas(ClientPlotUsage*, int width, int height, const void* imag e, SkIPoint16* loc); 106 GrPlot* addToAtlas(ClientPlotUsage*, int width, int height, const void* imag e, SkIPoint16* loc);
(...skipping 21 matching lines...) Expand all
128 return iter->init(fPlotList, kLRUFirst_IterOrder == order 128 return iter->init(fPlotList, kLRUFirst_IterOrder == order
129 ? GrPlotList::Iter::kTail _IterStart 129 ? GrPlotList::Iter::kTail _IterStart
130 : GrPlotList::Iter::kHead _IterStart); 130 : GrPlotList::Iter::kHead _IterStart);
131 } 131 }
132 132
133 private: 133 private:
134 void makeMRU(GrPlot* plot); 134 void makeMRU(GrPlot* plot);
135 135
136 GrGpu* fGpu; 136 GrGpu* fGpu;
137 GrPixelConfig fPixelConfig; 137 GrPixelConfig fPixelConfig;
138 GrTextureFlags fFlags; 138 GrSurfaceFlags fFlags;
139 GrTexture* fTexture; 139 GrTexture* fTexture;
140 SkISize fBackingTextureSize; 140 SkISize fBackingTextureSize;
141 int fNumPlotsX; 141 int fNumPlotsX;
142 int fNumPlotsY; 142 int fNumPlotsY;
143 bool fBatchUploads; 143 bool fBatchUploads;
144 144
145 // allocated array of GrPlots 145 // allocated array of GrPlots
146 GrPlot* fPlotArray; 146 GrPlot* fPlotArray;
147 // LRU list of GrPlots (MRU at head - LRU at tail) 147 // LRU list of GrPlots (MRU at head - LRU at tail)
148 GrPlotList fPlotList; 148 GrPlotList fPlotList;
149 }; 149 };
150 150
151 #endif 151 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698