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

Side by Side Diff: include/gpu/GrCaps.h

Issue 1300123002: Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 5 years, 4 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 | src/gpu/GrBufferAllocPool.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 #ifndef GrCaps_DEFINED 8 #ifndef GrCaps_DEFINED
9 #define GrCaps_DEFINED 9 #define GrCaps_DEFINED
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SkASSERT(fGeometryBufferMapThreshold >= 0); 211 SkASSERT(fGeometryBufferMapThreshold >= 0);
212 return fGeometryBufferMapThreshold; 212 return fGeometryBufferMapThreshold;
213 } 213 }
214 214
215 bool supportsInstancedDraws() const { 215 bool supportsInstancedDraws() const {
216 return fSupportsInstancedDraws; 216 return fSupportsInstancedDraws;
217 } 217 }
218 218
219 bool fullClearIsFree() const { return fFullClearIsFree; } 219 bool fullClearIsFree() const { return fFullClearIsFree; }
220 220
221 /** True in environments that will issue errors if memory uploaded to buffer s
222 is not initialized (even if not read by draw calls). */
223 bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferDa ta; }
224
221 protected: 225 protected:
222 /** Subclasses must call this at the end of their constructors in order to a pply caps 226 /** Subclasses must call this at the end of their constructors in order to a pply caps
223 overrides requested by the client. Note that overrides will only reduce the caps never 227 overrides requested by the client. Note that overrides will only reduce the caps never
224 expand them. */ 228 expand them. */
225 void applyOptionsOverrides(const GrContextOptions& options); 229 void applyOptionsOverrides(const GrContextOptions& options);
226 230
227 SkAutoTUnref<GrShaderCaps> fShaderCaps; 231 SkAutoTUnref<GrShaderCaps> fShaderCaps;
228 232
229 bool fNPOTTextureTileSupport : 1; 233 bool fNPOTTextureTileSupport : 1;
230 bool fMipMapSupport : 1; 234 bool fMipMapSupport : 1;
231 bool fTwoSidedStencilSupport : 1; 235 bool fTwoSidedStencilSupport : 1;
232 bool fStencilWrapOpsSupport : 1; 236 bool fStencilWrapOpsSupport : 1;
233 bool fDiscardRenderTargetSupport : 1; 237 bool fDiscardRenderTargetSupport : 1;
234 bool fReuseScratchTextures : 1; 238 bool fReuseScratchTextures : 1;
235 bool fReuseScratchBuffers : 1; 239 bool fReuseScratchBuffers : 1;
236 bool fGpuTracingSupport : 1; 240 bool fGpuTracingSupport : 1;
237 bool fCompressedTexSubImageSupport : 1; 241 bool fCompressedTexSubImageSupport : 1;
238 bool fOversizedStencilSupport : 1; 242 bool fOversizedStencilSupport : 1;
239 bool fTextureBarrierSupport : 1; 243 bool fTextureBarrierSupport : 1;
240 bool fSupportsInstancedDraws : 1; 244 bool fSupportsInstancedDraws : 1;
241 bool fFullClearIsFree : 1; 245 bool fFullClearIsFree : 1;
246 bool fMustClearUploadedBufferData : 1;
242 247
243 // Driver workaround 248 // Driver workaround
244 bool fUseDrawInsteadOfClear : 1; 249 bool fUseDrawInsteadOfClear : 1;
245 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; 250 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1;
246 251
247 BlendEquationSupport fBlendEquationSupport; 252 BlendEquationSupport fBlendEquationSupport;
248 uint32_t fAdvBlendEqBlacklist; 253 uint32_t fAdvBlendEqBlacklist;
249 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); 254 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
250 255
251 uint32_t fMapBufferFlags; 256 uint32_t fMapBufferFlags;
252 int fGeometryBufferMapThreshold; 257 int fGeometryBufferMapThreshold;
253 258
254 int fMaxRenderTargetSize; 259 int fMaxRenderTargetSize;
255 int fMaxTextureSize; 260 int fMaxTextureSize;
256 int fMinTextureSize; 261 int fMinTextureSize;
257 int fMaxSampleCount; 262 int fMaxSampleCount;
258 263
259 // The first entry for each config is without msaa and the second is with. 264 // The first entry for each config is without msaa and the second is with.
260 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 265 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
261 bool fConfigTextureSupport[kGrPixelConfigCnt]; 266 bool fConfigTextureSupport[kGrPixelConfigCnt];
262 267
263 private: 268 private:
264 bool fSupressPrints : 1; 269 bool fSupressPrints : 1;
265 bool fDrawPathMasksToCompressedTextureSupport : 1; 270 bool fDrawPathMasksToCompressedTextureSupport : 1;
266 271
267 typedef SkRefCnt INHERITED; 272 typedef SkRefCnt INHERITED;
268 }; 273 };
269 274
270 #endif 275 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBufferAllocPool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698