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

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 304743004: Move ETC1 and LATC enums value to GrPixelConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add LATC checks Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 8
9 #ifndef GrGLCaps_DEFINED 9 #ifndef GrGLCaps_DEFINED
10 #define GrGLCaps_DEFINED 10 #define GrGLCaps_DEFINED
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 263
264 bool fullClearIsFree() const { return fFullClearIsFree; } 264 bool fullClearIsFree() const { return fFullClearIsFree; }
265 265
266 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } 266 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
267 267
268 /** 268 /**
269 * Returns a string containing the caps info. 269 * Returns a string containing the caps info.
270 */ 270 */
271 virtual SkString dump() const SK_OVERRIDE; 271 virtual SkString dump() const SK_OVERRIDE;
272 272
robertphillips 2014/05/29 12:53:18 // LATC can appear under one of three possible nam
krajcevski 2014/05/29 14:28:22 Done.
273 enum LATCAlias {
274 kLATC_LATCAlias,
275 kRGTC_LATCAlias,
276 k3DC_LATCAlias
277 };
278
279 LATCAlias latcAlias() const { return fLATCAlias; }
280
273 private: 281 private:
274 /** 282 /**
275 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly 283 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly
276 * performing glCheckFrameBufferStatus for the same config. 284 * performing glCheckFrameBufferStatus for the same config.
277 */ 285 */
278 struct VerifiedColorConfigs { 286 struct VerifiedColorConfigs {
279 VerifiedColorConfigs() { 287 VerifiedColorConfigs() {
280 this->reset(); 288 this->reset();
281 } 289 }
282 290
(...skipping 23 matching lines...) Expand all
306 int bitIdx = config % 32; 314 int bitIdx = config % 32;
307 return SkToBool(fVerifiedColorConfigs[u32Idx] & (1 << bitIdx)); 315 return SkToBool(fVerifiedColorConfigs[u32Idx] & (1 << bitIdx));
308 } 316 }
309 }; 317 };
310 318
311 void initFSAASupport(const GrGLContextInfo&, const GrGLInterface*); 319 void initFSAASupport(const GrGLContextInfo&, const GrGLInterface*);
312 void initStencilFormats(const GrGLContextInfo&); 320 void initStencilFormats(const GrGLContextInfo&);
313 // This must be called after initFSAASupport(). 321 // This must be called after initFSAASupport().
314 void initConfigRenderableTable(const GrGLContextInfo&); 322 void initConfigRenderableTable(const GrGLContextInfo&);
315 323
316 void initCompressedTextureSupport(const GrGLContextInfo &);
317
318 // tracks configs that have been verified to pass the FBO completeness when 324 // tracks configs that have been verified to pass the FBO completeness when
319 // used as a color attachment 325 // used as a color attachment
320 VerifiedColorConfigs fVerifiedColorConfigs; 326 VerifiedColorConfigs fVerifiedColorConfigs;
321 327
322 SkTArray<StencilFormat, true> fStencilFormats; 328 SkTArray<StencilFormat, true> fStencilFormats;
323 // tracks configs that have been verified to pass the FBO completeness when 329 // tracks configs that have been verified to pass the FBO completeness when
324 // used as a color attachment when a particular stencil format is used 330 // used as a color attachment when a particular stencil format is used
325 // as a stencil attachment. 331 // as a stencil attachment.
326 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; 332 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs;
327 333
328 int fMaxFragmentUniformVectors; 334 int fMaxFragmentUniformVectors;
329 int fMaxVertexAttributes; 335 int fMaxVertexAttributes;
330 int fMaxFragmentTextureUnits; 336 int fMaxFragmentTextureUnits;
331 int fMaxFixedFunctionTextureCoords; 337 int fMaxFixedFunctionTextureCoords;
332 338
333 MSFBOType fMSFBOType; 339 MSFBOType fMSFBOType;
334 FBFetchType fFBFetchType; 340 FBFetchType fFBFetchType;
335 InvalidateFBType fInvalidateFBType; 341 InvalidateFBType fInvalidateFBType;
336 MapBufferType fMapBufferType; 342 MapBufferType fMapBufferType;
343 LATCAlias fLATCAlias;
337 344
338 bool fRGBA8RenderbufferSupport : 1; 345 bool fRGBA8RenderbufferSupport : 1;
339 bool fBGRAFormatSupport : 1; 346 bool fBGRAFormatSupport : 1;
340 bool fBGRAIsInternalFormat : 1; 347 bool fBGRAIsInternalFormat : 1;
341 bool fTextureSwizzleSupport : 1; 348 bool fTextureSwizzleSupport : 1;
342 bool fUnpackRowLengthSupport : 1; 349 bool fUnpackRowLengthSupport : 1;
343 bool fUnpackFlipYSupport : 1; 350 bool fUnpackFlipYSupport : 1;
344 bool fPackRowLengthSupport : 1; 351 bool fPackRowLengthSupport : 1;
345 bool fPackFlipYSupport : 1; 352 bool fPackFlipYSupport : 1;
346 bool fTextureUsageSupport : 1; 353 bool fTextureUsageSupport : 1;
347 bool fTexStorageSupport : 1; 354 bool fTexStorageSupport : 1;
348 bool fTextureRedSupport : 1; 355 bool fTextureRedSupport : 1;
349 bool fImagingSupport : 1; 356 bool fImagingSupport : 1;
350 bool fTwoFormatLimit : 1; 357 bool fTwoFormatLimit : 1;
351 bool fFragCoordsConventionSupport : 1; 358 bool fFragCoordsConventionSupport : 1;
352 bool fVertexArrayObjectSupport : 1; 359 bool fVertexArrayObjectSupport : 1;
353 bool fUseNonVBOVertexAndIndexDynamicData : 1; 360 bool fUseNonVBOVertexAndIndexDynamicData : 1;
354 bool fIsCoreProfile : 1; 361 bool fIsCoreProfile : 1;
355 bool fFullClearIsFree : 1; 362 bool fFullClearIsFree : 1;
356 bool fDropsTileOnZeroDivide : 1; 363 bool fDropsTileOnZeroDivide : 1;
357 364
358 typedef GrDrawTargetCaps INHERITED; 365 typedef GrDrawTargetCaps INHERITED;
359 }; 366 };
360 367
361 #endif 368 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698