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

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 isConfigTexturable() 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
273 /**
274 * LATC can appear under one of three possible names. In order to know
275 * which GL internal format to use, we need to keep track of which name
276 * we found LATC under. The default is LATC.
277 */
278 enum LATCAlias {
279 kLATC_LATCAlias,
280 kRGTC_LATCAlias,
281 k3DC_LATCAlias
282 };
283
284 LATCAlias latcAlias() const { return fLATCAlias; }
285
273 private: 286 private:
274 /** 287 /**
275 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly 288 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly
276 * performing glCheckFrameBufferStatus for the same config. 289 * performing glCheckFrameBufferStatus for the same config.
277 */ 290 */
278 struct VerifiedColorConfigs { 291 struct VerifiedColorConfigs {
279 VerifiedColorConfigs() { 292 VerifiedColorConfigs() {
280 this->reset(); 293 this->reset();
281 } 294 }
282 295
(...skipping 22 matching lines...) Expand all
305 int u32Idx = config / 32; 318 int u32Idx = config / 32;
306 int bitIdx = config % 32; 319 int bitIdx = config % 32;
307 return SkToBool(fVerifiedColorConfigs[u32Idx] & (1 << bitIdx)); 320 return SkToBool(fVerifiedColorConfigs[u32Idx] & (1 << bitIdx));
308 } 321 }
309 }; 322 };
310 323
311 void initFSAASupport(const GrGLContextInfo&, const GrGLInterface*); 324 void initFSAASupport(const GrGLContextInfo&, const GrGLInterface*);
312 void initStencilFormats(const GrGLContextInfo&); 325 void initStencilFormats(const GrGLContextInfo&);
313 // This must be called after initFSAASupport(). 326 // This must be called after initFSAASupport().
314 void initConfigRenderableTable(const GrGLContextInfo&); 327 void initConfigRenderableTable(const GrGLContextInfo&);
315 328 void initConfigTexturableTable(const GrGLContextInfo&);
316 void initCompressedTextureSupport(const GrGLContextInfo &);
317 329
318 // tracks configs that have been verified to pass the FBO completeness when 330 // tracks configs that have been verified to pass the FBO completeness when
319 // used as a color attachment 331 // used as a color attachment
320 VerifiedColorConfigs fVerifiedColorConfigs; 332 VerifiedColorConfigs fVerifiedColorConfigs;
321 333
322 SkTArray<StencilFormat, true> fStencilFormats; 334 SkTArray<StencilFormat, true> fStencilFormats;
323 // tracks configs that have been verified to pass the FBO completeness when 335 // 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 336 // used as a color attachment when a particular stencil format is used
325 // as a stencil attachment. 337 // as a stencil attachment.
326 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; 338 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs;
327 339
328 int fMaxFragmentUniformVectors; 340 int fMaxFragmentUniformVectors;
329 int fMaxVertexAttributes; 341 int fMaxVertexAttributes;
330 int fMaxFragmentTextureUnits; 342 int fMaxFragmentTextureUnits;
331 int fMaxFixedFunctionTextureCoords; 343 int fMaxFixedFunctionTextureCoords;
332 344
333 MSFBOType fMSFBOType; 345 MSFBOType fMSFBOType;
334 FBFetchType fFBFetchType; 346 FBFetchType fFBFetchType;
335 InvalidateFBType fInvalidateFBType; 347 InvalidateFBType fInvalidateFBType;
336 MapBufferType fMapBufferType; 348 MapBufferType fMapBufferType;
349 LATCAlias fLATCAlias;
337 350
338 bool fRGBA8RenderbufferSupport : 1; 351 bool fRGBA8RenderbufferSupport : 1;
339 bool fBGRAFormatSupport : 1; 352 bool fBGRAFormatSupport : 1;
340 bool fBGRAIsInternalFormat : 1; 353 bool fBGRAIsInternalFormat : 1;
341 bool fTextureSwizzleSupport : 1; 354 bool fTextureSwizzleSupport : 1;
342 bool fUnpackRowLengthSupport : 1; 355 bool fUnpackRowLengthSupport : 1;
343 bool fUnpackFlipYSupport : 1; 356 bool fUnpackFlipYSupport : 1;
344 bool fPackRowLengthSupport : 1; 357 bool fPackRowLengthSupport : 1;
345 bool fPackFlipYSupport : 1; 358 bool fPackFlipYSupport : 1;
346 bool fTextureUsageSupport : 1; 359 bool fTextureUsageSupport : 1;
347 bool fTexStorageSupport : 1; 360 bool fTexStorageSupport : 1;
348 bool fTextureRedSupport : 1; 361 bool fTextureRedSupport : 1;
349 bool fImagingSupport : 1; 362 bool fImagingSupport : 1;
350 bool fTwoFormatLimit : 1; 363 bool fTwoFormatLimit : 1;
351 bool fFragCoordsConventionSupport : 1; 364 bool fFragCoordsConventionSupport : 1;
352 bool fVertexArrayObjectSupport : 1; 365 bool fVertexArrayObjectSupport : 1;
353 bool fUseNonVBOVertexAndIndexDynamicData : 1; 366 bool fUseNonVBOVertexAndIndexDynamicData : 1;
354 bool fIsCoreProfile : 1; 367 bool fIsCoreProfile : 1;
355 bool fFullClearIsFree : 1; 368 bool fFullClearIsFree : 1;
356 bool fDropsTileOnZeroDivide : 1; 369 bool fDropsTileOnZeroDivide : 1;
357 370
358 typedef GrDrawTargetCaps INHERITED; 371 typedef GrDrawTargetCaps INHERITED;
359 }; 372 };
360 373
361 #endif 374 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/gl/GrGLCaps.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698