| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 */ | 70 */ |
| 71 kES_EXT_MsToTexture_MSFBOType, | 71 kES_EXT_MsToTexture_MSFBOType, |
| 72 /** | 72 /** |
| 73 * GL_NV_framebuffer_mixed_samples. | 73 * GL_NV_framebuffer_mixed_samples. |
| 74 */ | 74 */ |
| 75 kMixedSamples_MSFBOType, | 75 kMixedSamples_MSFBOType, |
| 76 | 76 |
| 77 kLast_MSFBOType = kMixedSamples_MSFBOType | 77 kLast_MSFBOType = kMixedSamples_MSFBOType |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 enum BlitFramebufferSupport { |
| 81 kNone_BlitFramebufferSupport, |
| 82 /** |
| 83 * ANGLE exposes a limited blit framebuffer extension that does not allo
w for stretching |
| 84 * or mirroring. |
| 85 */ |
| 86 kNoScalingNoMirroring_BlitFramebufferSupport, |
| 87 kFull_BlitFramebufferSupport |
| 88 }; |
| 89 |
| 80 enum InvalidateFBType { | 90 enum InvalidateFBType { |
| 81 kNone_InvalidateFBType, | 91 kNone_InvalidateFBType, |
| 82 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() | 92 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() |
| 83 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() | 93 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() |
| 84 | 94 |
| 85 kLast_InvalidateFBType = kInvalidate_InvalidateFBType | 95 kLast_InvalidateFBType = kInvalidate_InvalidateFBType |
| 86 }; | 96 }; |
| 87 | 97 |
| 88 enum MapBufferType { | 98 enum MapBufferType { |
| 89 kNone_MapBufferType, | 99 kNone_MapBufferType, |
| 90 kMapBuffer_MapBufferType, // glMapBuffer() | 100 kMapBuffer_MapBufferType, // glMapBuffer() |
| 91 kMapBufferRange_MapBufferType, // glMapBufferRange() | 101 kMapBufferRange_MapBufferType, // glMapBufferRange() |
| 92 kChromium_MapBufferType, // GL_CHROMIUM_map_sub | 102 kChromium_MapBufferType, // GL_CHROMIUM_map_sub |
| 93 | 103 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const { | 205 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const { |
| 196 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kVerifiedColor
Attachment_Flag); | 206 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kVerifiedColor
Attachment_Flag); |
| 197 } | 207 } |
| 198 | 208 |
| 199 /** | 209 /** |
| 200 * Reports the type of MSAA FBO support. | 210 * Reports the type of MSAA FBO support. |
| 201 */ | 211 */ |
| 202 MSFBOType msFBOType() const { return fMSFBOType; } | 212 MSFBOType msFBOType() const { return fMSFBOType; } |
| 203 | 213 |
| 204 /** | 214 /** |
| 205 * Does the supported MSAA FBO extension have MSAA renderbuffers? | 215 * Does the preferred MSAA FBO extension have MSAA renderbuffers? |
| 206 */ | 216 */ |
| 207 bool usesMSAARenderBuffers() const { | 217 bool usesMSAARenderBuffers() const { |
| 208 return kNone_MSFBOType != fMSFBOType && | 218 return kNone_MSFBOType != fMSFBOType && |
| 209 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && | 219 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && |
| 210 kES_EXT_MsToTexture_MSFBOType != fMSFBOType && | 220 kES_EXT_MsToTexture_MSFBOType != fMSFBOType && |
| 211 kMixedSamples_MSFBOType != fMSFBOType; | 221 kMixedSamples_MSFBOType != fMSFBOType; |
| 212 } | 222 } |
| 213 | 223 |
| 214 /** | 224 /** |
| 225 * What functionality is supported by glBlitFramebuffer. |
| 226 */ |
| 227 BlitFramebufferSupport blitFramebufferSupport() const { return fBlitFramebuf
ferSupport; } |
| 228 |
| 229 /** |
| 215 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and | 230 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and |
| 216 * then implicitly resolved when read. | 231 * then implicitly resolved when read. |
| 217 */ | 232 */ |
| 218 bool usesImplicitMSAAResolve() const { | 233 bool usesImplicitMSAAResolve() const { |
| 219 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 234 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |
| 220 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 235 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |
| 221 } | 236 } |
| 222 | 237 |
| 223 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } | 238 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } |
| 224 | 239 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 bool fIsCoreProfile : 1; | 411 bool fIsCoreProfile : 1; |
| 397 bool fBindFragDataLocationSupport : 1; | 412 bool fBindFragDataLocationSupport : 1; |
| 398 bool fSRGBWriteControl : 1; | 413 bool fSRGBWriteControl : 1; |
| 399 bool fRGBA8888PixelsOpsAreSlow : 1; | 414 bool fRGBA8888PixelsOpsAreSlow : 1; |
| 400 bool fPartialFBOReadIsSlow : 1; | 415 bool fPartialFBOReadIsSlow : 1; |
| 401 bool fBindUniformLocationSupport : 1; | 416 bool fBindUniformLocationSupport : 1; |
| 402 bool fExternalTextureSupport : 1; | 417 bool fExternalTextureSupport : 1; |
| 403 bool fRectangleTextureSupport : 1; | 418 bool fRectangleTextureSupport : 1; |
| 404 bool fTextureSwizzleSupport : 1; | 419 bool fTextureSwizzleSupport : 1; |
| 405 | 420 |
| 421 BlitFramebufferSupport fBlitFramebufferSupport; |
| 422 |
| 406 /** Number type of the components (with out considering number of bits.) */ | 423 /** Number type of the components (with out considering number of bits.) */ |
| 407 enum FormatType { | 424 enum FormatType { |
| 408 kNormalizedFixedPoint_FormatType, | 425 kNormalizedFixedPoint_FormatType, |
| 409 kFloat_FormatType, | 426 kFloat_FormatType, |
| 410 }; | 427 }; |
| 411 | 428 |
| 412 struct ReadPixelsFormat { | 429 struct ReadPixelsFormat { |
| 413 ReadPixelsFormat() : fFormat(0), fType(0) {} | 430 ReadPixelsFormat() : fFormat(0), fType(0) {} |
| 414 GrGLenum fFormat; | 431 GrGLenum fFormat; |
| 415 GrGLenum fType; | 432 GrGLenum fType; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 | 487 |
| 471 GrSwizzle fSwizzle; | 488 GrSwizzle fSwizzle; |
| 472 }; | 489 }; |
| 473 | 490 |
| 474 ConfigInfo fConfigTable[kGrPixelConfigCnt]; | 491 ConfigInfo fConfigTable[kGrPixelConfigCnt]; |
| 475 | 492 |
| 476 typedef GrCaps INHERITED; | 493 typedef GrCaps INHERITED; |
| 477 }; | 494 }; |
| 478 | 495 |
| 479 #endif | 496 #endif |
| OLD | NEW |