| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 /// Is there support for GL_EXT_direct_state_access? | 207 /// Is there support for GL_EXT_direct_state_access? |
| 208 bool directStateAccessSupport() const { return fDirectStateAccessSupport; } | 208 bool directStateAccessSupport() const { return fDirectStateAccessSupport; } |
| 209 | 209 |
| 210 /// Is there support for GL_KHR_debug? | 210 /// Is there support for GL_KHR_debug? |
| 211 bool debugSupport() const { return fDebugSupport; } | 211 bool debugSupport() const { return fDebugSupport; } |
| 212 | 212 |
| 213 /// Is there support for ES2 compatability? | 213 /// Is there support for ES2 compatability? |
| 214 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } | 214 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } |
| 215 | 215 |
| 216 /// Can we call glDisable(GL_MULTISAMPLE)? |
| 217 bool multisampleDisableSupport() const { |
| 218 return fMultisampleDisableSupport; |
| 219 } |
| 220 |
| 216 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. | 221 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. |
| 217 bool useNonVBOVertexAndIndexDynamicData() const { | 222 bool useNonVBOVertexAndIndexDynamicData() const { |
| 218 return fUseNonVBOVertexAndIndexDynamicData; | 223 return fUseNonVBOVertexAndIndexDynamicData; |
| 219 } | 224 } |
| 220 | 225 |
| 221 /// Does ReadPixels support the provided format/type combo? | 226 /// Does ReadPixels support the provided format/type combo? |
| 222 bool readPixelsSupported(const GrGLInterface* intf, | 227 bool readPixelsSupported(const GrGLInterface* intf, |
| 223 GrGLenum format, | 228 GrGLenum format, |
| 224 GrGLenum type, | 229 GrGLenum type, |
| 225 GrGLenum currFboFormat) const; | 230 GrGLenum currFboFormat) const; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 bool fTexStorageSupport : 1; | 349 bool fTexStorageSupport : 1; |
| 345 bool fTextureRedSupport : 1; | 350 bool fTextureRedSupport : 1; |
| 346 bool fImagingSupport : 1; | 351 bool fImagingSupport : 1; |
| 347 bool fTwoFormatLimit : 1; | 352 bool fTwoFormatLimit : 1; |
| 348 bool fFragCoordsConventionSupport : 1; | 353 bool fFragCoordsConventionSupport : 1; |
| 349 bool fVertexArrayObjectSupport : 1; | 354 bool fVertexArrayObjectSupport : 1; |
| 350 bool fInstancedDrawingSupport : 1; | 355 bool fInstancedDrawingSupport : 1; |
| 351 bool fDirectStateAccessSupport : 1; | 356 bool fDirectStateAccessSupport : 1; |
| 352 bool fDebugSupport : 1; | 357 bool fDebugSupport : 1; |
| 353 bool fES2CompatibilitySupport : 1; | 358 bool fES2CompatibilitySupport : 1; |
| 359 bool fMultisampleDisableSupport : 1; |
| 354 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 360 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
| 355 bool fIsCoreProfile : 1; | 361 bool fIsCoreProfile : 1; |
| 356 bool fBindFragDataLocationSupport : 1; | 362 bool fBindFragDataLocationSupport : 1; |
| 357 bool fSRGBWriteControl : 1; | 363 bool fSRGBWriteControl : 1; |
| 358 bool fRGBA8888PixelsOpsAreSlow : 1; | 364 bool fRGBA8888PixelsOpsAreSlow : 1; |
| 359 bool fPartialFBOReadIsSlow : 1; | 365 bool fPartialFBOReadIsSlow : 1; |
| 360 bool fBindUniformLocationSupport : 1; | 366 bool fBindUniformLocationSupport : 1; |
| 361 | 367 |
| 362 struct ReadPixelsSupportedFormat { | 368 struct ReadPixelsSupportedFormat { |
| 363 GrGLenum fFormat; | 369 GrGLenum fFormat; |
| 364 GrGLenum fType; | 370 GrGLenum fType; |
| 365 GrGLenum fFboFormat; | 371 GrGLenum fFboFormat; |
| 366 | 372 |
| 367 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 373 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
| 368 return fFormat == rhs.fFormat | 374 return fFormat == rhs.fFormat |
| 369 && fType == rhs.fType | 375 && fType == rhs.fType |
| 370 && fFboFormat == rhs.fFboFormat; | 376 && fFboFormat == rhs.fFboFormat; |
| 371 } | 377 } |
| 372 }; | 378 }; |
| 373 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 379 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
| 374 | 380 |
| 375 typedef GrCaps INHERITED; | 381 typedef GrCaps INHERITED; |
| 376 }; | 382 }; |
| 377 | 383 |
| 378 #endif | 384 #endif |
| OLD | NEW |