| OLD | NEW |
| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 enum MapBufferType { | 84 enum MapBufferType { |
| 85 kNone_MapBufferType, | 85 kNone_MapBufferType, |
| 86 kMapBuffer_MapBufferType, // glMapBuffer() | 86 kMapBuffer_MapBufferType, // glMapBuffer() |
| 87 kMapBufferRange_MapBufferType, // glMapBufferRange() | 87 kMapBufferRange_MapBufferType, // glMapBufferRange() |
| 88 kChromium_MapBufferType, // GL_CHROMIUM_map_sub | 88 kChromium_MapBufferType, // GL_CHROMIUM_map_sub |
| 89 | 89 |
| 90 kLast_MapBufferType = kChromium_MapBufferType, | 90 kLast_MapBufferType = kChromium_MapBufferType, |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 enum TransferBufferType { |
| 94 kNone_TransferBufferType, |
| 95 kPBO_TransferBufferType, // ARB_pixel_buffer_object |
| 96 kChromium_TransferBufferType, // CHROMIUM_pixel_transfer_buffer_obje
ct |
| 97 |
| 98 kLast_TransferBufferType = kChromium_TransferBufferType, |
| 99 }; |
| 100 |
| 93 /** | 101 /** |
| 94 * Initializes the GrGLCaps to the set of features supported in the current | 102 * Initializes the GrGLCaps to the set of features supported in the current |
| 95 * OpenGL context accessible via ctxInfo. | 103 * OpenGL context accessible via ctxInfo. |
| 96 */ | 104 */ |
| 97 GrGLCaps(const GrContextOptions& contextOptions, const GrGLContextInfo& ctxI
nfo, | 105 GrGLCaps(const GrContextOptions& contextOptions, const GrGLContextInfo& ctxI
nfo, |
| 98 const GrGLInterface* glInterface); | 106 const GrGLInterface* glInterface); |
| 99 | 107 |
| 100 /** | 108 /** |
| 101 * Call to note that a color config has been verified as a valid color | 109 * Call to note that a color config has been verified as a valid color |
| 102 * attachment. This may save future calls to glCheckFramebufferStatus | 110 * attachment. This may save future calls to glCheckFramebufferStatus |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 bool usesImplicitMSAAResolve() const { | 144 bool usesImplicitMSAAResolve() const { |
| 137 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 145 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |
| 138 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 146 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |
| 139 } | 147 } |
| 140 | 148 |
| 141 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } | 149 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } |
| 142 | 150 |
| 143 /// What type of buffer mapping is supported? | 151 /// What type of buffer mapping is supported? |
| 144 MapBufferType mapBufferType() const { return fMapBufferType; } | 152 MapBufferType mapBufferType() const { return fMapBufferType; } |
| 145 | 153 |
| 154 /// What type of transfer buffer is supported? |
| 155 TransferBufferType transferBufferType() const { return fTransferBufferType;
} |
| 156 |
| 146 /** | 157 /** |
| 147 * Gets an array of legal stencil formats. These formats are not guaranteed | 158 * Gets an array of legal stencil formats. These formats are not guaranteed |
| 148 * to be supported by the driver but are legal GLenum names given the GL | 159 * to be supported by the driver but are legal GLenum names given the GL |
| 149 * version and extensions supported. | 160 * version and extensions supported. |
| 150 */ | 161 */ |
| 151 const SkTArray<StencilFormat, true>& stencilFormats() const { | 162 const SkTArray<StencilFormat, true>& stencilFormats() const { |
| 152 return fStencilFormats; | 163 return fStencilFormats; |
| 153 } | 164 } |
| 154 | 165 |
| 155 /// The maximum number of fragment uniform vectors (GLES has min. 16). | 166 /// The maximum number of fragment uniform vectors (GLES has min. 16). |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 341 |
| 331 SkTArray<StencilFormat, true> fStencilFormats; | 342 SkTArray<StencilFormat, true> fStencilFormats; |
| 332 | 343 |
| 333 int fMaxFragmentUniformVectors; | 344 int fMaxFragmentUniformVectors; |
| 334 int fMaxVertexAttributes; | 345 int fMaxVertexAttributes; |
| 335 int fMaxFragmentTextureUnits; | 346 int fMaxFragmentTextureUnits; |
| 336 | 347 |
| 337 MSFBOType fMSFBOType; | 348 MSFBOType fMSFBOType; |
| 338 InvalidateFBType fInvalidateFBType; | 349 InvalidateFBType fInvalidateFBType; |
| 339 MapBufferType fMapBufferType; | 350 MapBufferType fMapBufferType; |
| 351 TransferBufferType fTransferBufferType; |
| 340 LATCAlias fLATCAlias; | 352 LATCAlias fLATCAlias; |
| 341 | 353 |
| 342 bool fRGBA8RenderbufferSupport : 1; | 354 bool fRGBA8RenderbufferSupport : 1; |
| 343 bool fBGRAIsInternalFormat : 1; | 355 bool fBGRAIsInternalFormat : 1; |
| 344 bool fUnpackRowLengthSupport : 1; | 356 bool fUnpackRowLengthSupport : 1; |
| 345 bool fUnpackFlipYSupport : 1; | 357 bool fUnpackFlipYSupport : 1; |
| 346 bool fPackRowLengthSupport : 1; | 358 bool fPackRowLengthSupport : 1; |
| 347 bool fPackFlipYSupport : 1; | 359 bool fPackFlipYSupport : 1; |
| 348 bool fTextureUsageSupport : 1; | 360 bool fTextureUsageSupport : 1; |
| 349 bool fTexStorageSupport : 1; | 361 bool fTexStorageSupport : 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 375 && fType == rhs.fType | 387 && fType == rhs.fType |
| 376 && fFboFormat == rhs.fFboFormat; | 388 && fFboFormat == rhs.fFboFormat; |
| 377 } | 389 } |
| 378 }; | 390 }; |
| 379 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 391 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
| 380 | 392 |
| 381 typedef GrCaps INHERITED; | 393 typedef GrCaps INHERITED; |
| 382 }; | 394 }; |
| 383 | 395 |
| 384 #endif | 396 #endif |
| OLD | NEW |