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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 /// What type of transfer buffer is supported? | 248 /// What type of transfer buffer is supported? |
249 TransferBufferType transferBufferType() const { return fTransferBufferType;
} | 249 TransferBufferType transferBufferType() const { return fTransferBufferType;
} |
250 | 250 |
251 /// The maximum number of fragment uniform vectors (GLES has min. 16). | 251 /// The maximum number of fragment uniform vectors (GLES has min. 16). |
252 int maxFragmentUniformVectors() const { return fMaxFragmentUniformVectors; } | 252 int maxFragmentUniformVectors() const { return fMaxFragmentUniformVectors; } |
253 | 253 |
254 /// maximum number of attribute values per vertex | 254 /// maximum number of attribute values per vertex |
255 int maxVertexAttributes() const { return fMaxVertexAttributes; } | 255 int maxVertexAttributes() const { return fMaxVertexAttributes; } |
256 | 256 |
257 /// maximum number of texture units accessible in the fragment shader. | |
258 int maxFragmentTextureUnits() const { return fMaxFragmentTextureUnits; } | |
259 | |
260 /** | 257 /** |
261 * Depending on the ES extensions present the BGRA external format may | 258 * Depending on the ES extensions present the BGRA external format may |
262 * correspond to either a BGRA or RGBA internalFormat. On desktop GL it is | 259 * correspond to either a BGRA or RGBA internalFormat. On desktop GL it is |
263 * RGBA. | 260 * RGBA. |
264 */ | 261 */ |
265 bool bgraIsInternalFormat() const; | 262 bool bgraIsInternalFormat() const; |
266 | 263 |
267 /// Is there support for GL_UNPACK_ROW_LENGTH | 264 /// Is there support for GL_UNPACK_ROW_LENGTH |
268 bool unpackRowLengthSupport() const { return fUnpackRowLengthSupport; } | 265 bool unpackRowLengthSupport() const { return fUnpackRowLengthSupport; } |
269 | 266 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 GrPixelConfig readConfig, | 316 GrPixelConfig readConfig, |
320 std::function<void (GrGLenum, GrGLint*)> getInteger
v, | 317 std::function<void (GrGLenum, GrGLint*)> getInteger
v, |
321 std::function<bool ()> bindRenderTarget) const; | 318 std::function<bool ()> bindRenderTarget) const; |
322 | 319 |
323 bool isCoreProfile() const { return fIsCoreProfile; } | 320 bool isCoreProfile() const { return fIsCoreProfile; } |
324 | 321 |
325 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } | 322 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } |
326 | 323 |
327 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport
; } | 324 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport
; } |
328 | 325 |
329 /// Are textures with GL_TEXTURE_EXTERNAL_OES type supported. | |
330 bool externalTextureSupport() const { return fExternalTextureSupport; } | |
331 | |
332 /// Are textures with GL_TEXTURE_RECTANGLE type supported. | 326 /// Are textures with GL_TEXTURE_RECTANGLE type supported. |
333 bool rectangleTextureSupport() const { return fRectangleTextureSupport; } | 327 bool rectangleTextureSupport() const { return fRectangleTextureSupport; } |
334 | 328 |
335 /// GL_ARB_texture_swizzle | 329 /// GL_ARB_texture_swizzle |
336 bool textureSwizzleSupport() const { return fTextureSwizzleSupport; } | 330 bool textureSwizzleSupport() const { return fTextureSwizzleSupport; } |
337 | 331 |
338 /** | 332 /** |
339 * Is there support for enabling/disabling sRGB writes for sRGB-capable colo
r attachments? | 333 * Is there support for enabling/disabling sRGB writes for sRGB-capable colo
r attachments? |
340 * If false this does not mean sRGB is not supported but rather that if it i
s supported | 334 * If false this does not mean sRGB is not supported but rather that if it i
s supported |
341 * it cannot be turned off for configs that support it. | 335 * it cannot be turned off for configs that support it. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, | 375 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, |
382 const GrGLInterface* intf, | 376 const GrGLInterface* intf, |
383 GrGLSLCaps* glslCaps); | 377 GrGLSLCaps* glslCaps); |
384 | 378 |
385 GrGLStandard fStandard; | 379 GrGLStandard fStandard; |
386 | 380 |
387 SkTArray<StencilFormat, true> fStencilFormats; | 381 SkTArray<StencilFormat, true> fStencilFormats; |
388 | 382 |
389 int fMaxFragmentUniformVectors; | 383 int fMaxFragmentUniformVectors; |
390 int fMaxVertexAttributes; | 384 int fMaxVertexAttributes; |
391 int fMaxFragmentTextureUnits; | |
392 | 385 |
393 MSFBOType fMSFBOType; | 386 MSFBOType fMSFBOType; |
394 InvalidateFBType fInvalidateFBType; | 387 InvalidateFBType fInvalidateFBType; |
395 MapBufferType fMapBufferType; | 388 MapBufferType fMapBufferType; |
396 TransferBufferType fTransferBufferType; | 389 TransferBufferType fTransferBufferType; |
397 | 390 |
398 bool fUnpackRowLengthSupport : 1; | 391 bool fUnpackRowLengthSupport : 1; |
399 bool fUnpackFlipYSupport : 1; | 392 bool fUnpackFlipYSupport : 1; |
400 bool fPackRowLengthSupport : 1; | 393 bool fPackRowLengthSupport : 1; |
401 bool fPackFlipYSupport : 1; | 394 bool fPackFlipYSupport : 1; |
402 bool fTextureUsageSupport : 1; | 395 bool fTextureUsageSupport : 1; |
403 bool fTextureRedSupport : 1; | 396 bool fTextureRedSupport : 1; |
404 bool fImagingSupport : 1; | 397 bool fImagingSupport : 1; |
405 bool fVertexArrayObjectSupport : 1; | 398 bool fVertexArrayObjectSupport : 1; |
406 bool fDirectStateAccessSupport : 1; | 399 bool fDirectStateAccessSupport : 1; |
407 bool fDebugSupport : 1; | 400 bool fDebugSupport : 1; |
408 bool fES2CompatibilitySupport : 1; | 401 bool fES2CompatibilitySupport : 1; |
409 bool fMultisampleDisableSupport : 1; | 402 bool fMultisampleDisableSupport : 1; |
410 bool fDrawIndirectSupport : 1; | 403 bool fDrawIndirectSupport : 1; |
411 bool fMultiDrawIndirectSupport : 1; | 404 bool fMultiDrawIndirectSupport : 1; |
412 bool fBaseInstanceSupport : 1; | 405 bool fBaseInstanceSupport : 1; |
413 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 406 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
414 bool fIsCoreProfile : 1; | 407 bool fIsCoreProfile : 1; |
415 bool fBindFragDataLocationSupport : 1; | 408 bool fBindFragDataLocationSupport : 1; |
416 bool fSRGBWriteControl : 1; | 409 bool fSRGBWriteControl : 1; |
417 bool fRGBA8888PixelsOpsAreSlow : 1; | 410 bool fRGBA8888PixelsOpsAreSlow : 1; |
418 bool fPartialFBOReadIsSlow : 1; | 411 bool fPartialFBOReadIsSlow : 1; |
419 bool fBindUniformLocationSupport : 1; | 412 bool fBindUniformLocationSupport : 1; |
420 bool fExternalTextureSupport : 1; | |
421 bool fRectangleTextureSupport : 1; | 413 bool fRectangleTextureSupport : 1; |
422 bool fTextureSwizzleSupport : 1; | 414 bool fTextureSwizzleSupport : 1; |
423 bool fMipMapLevelAndLodControlSupport : 1; | 415 bool fMipMapLevelAndLodControlSupport : 1; |
424 | 416 |
425 BlitFramebufferSupport fBlitFramebufferSupport; | 417 BlitFramebufferSupport fBlitFramebufferSupport; |
426 | 418 |
427 /** Number type of the components (with out considering number of bits.) */ | 419 /** Number type of the components (with out considering number of bits.) */ |
428 enum FormatType { | 420 enum FormatType { |
429 kNormalizedFixedPoint_FormatType, | 421 kNormalizedFixedPoint_FormatType, |
430 kFloat_FormatType, | 422 kFloat_FormatType, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 484 |
493 GrSwizzle fSwizzle; | 485 GrSwizzle fSwizzle; |
494 }; | 486 }; |
495 | 487 |
496 ConfigInfo fConfigTable[kGrPixelConfigCnt]; | 488 ConfigInfo fConfigTable[kGrPixelConfigCnt]; |
497 | 489 |
498 typedef GrCaps INHERITED; | 490 typedef GrCaps INHERITED; |
499 }; | 491 }; |
500 | 492 |
501 #endif | 493 #endif |
OLD | NEW |