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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 245 } |
246 | 246 |
247 /// Does ReadPixels support the provided format/type combo? | 247 /// Does ReadPixels support the provided format/type combo? |
248 bool readPixelsSupported(const GrGLInterface* intf, | 248 bool readPixelsSupported(const GrGLInterface* intf, |
249 GrGLenum format, | 249 GrGLenum format, |
250 GrGLenum type, | 250 GrGLenum type, |
251 GrGLenum currFboFormat) const; | 251 GrGLenum currFboFormat) const; |
252 | 252 |
253 bool isCoreProfile() const { return fIsCoreProfile; } | 253 bool isCoreProfile() const { return fIsCoreProfile; } |
254 | 254 |
255 bool fullClearIsFree() const { return fFullClearIsFree; } | |
256 | |
257 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } | 255 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } |
258 | 256 |
259 /** | 257 /** |
260 * Is there support for enabling/disabling sRGB writes for sRGB-capable colo
r attachments? | 258 * Is there support for enabling/disabling sRGB writes for sRGB-capable colo
r attachments? |
261 * If false this does not mean sRGB is not supported but rather that if it i
s supported | 259 * If false this does not mean sRGB is not supported but rather that if it i
s supported |
262 * it cannot be turned off for configs that support it. | 260 * it cannot be turned off for configs that support it. |
263 */ | 261 */ |
264 bool srgbWriteControl() const { return fSRGBWriteControl; } | 262 bool srgbWriteControl() const { return fSRGBWriteControl; } |
265 | 263 |
266 /** | 264 /** |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 bool fTwoFormatLimit : 1; | 371 bool fTwoFormatLimit : 1; |
374 bool fFragCoordsConventionSupport : 1; | 372 bool fFragCoordsConventionSupport : 1; |
375 bool fVertexArrayObjectSupport : 1; | 373 bool fVertexArrayObjectSupport : 1; |
376 bool fInstancedDrawingSupport : 1; | 374 bool fInstancedDrawingSupport : 1; |
377 bool fDirectStateAccessSupport : 1; | 375 bool fDirectStateAccessSupport : 1; |
378 bool fDebugSupport : 1; | 376 bool fDebugSupport : 1; |
379 bool fES2CompatibilitySupport : 1; | 377 bool fES2CompatibilitySupport : 1; |
380 bool fMultisampleDisableSupport : 1; | 378 bool fMultisampleDisableSupport : 1; |
381 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 379 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
382 bool fIsCoreProfile : 1; | 380 bool fIsCoreProfile : 1; |
383 bool fFullClearIsFree : 1; | |
384 bool fBindFragDataLocationSupport : 1; | 381 bool fBindFragDataLocationSupport : 1; |
385 bool fSRGBWriteControl : 1; | 382 bool fSRGBWriteControl : 1; |
386 bool fRGBA8888PixelsOpsAreSlow : 1; | 383 bool fRGBA8888PixelsOpsAreSlow : 1; |
387 bool fPartialFBOReadIsSlow : 1; | 384 bool fPartialFBOReadIsSlow : 1; |
388 | 385 |
389 struct ReadPixelsSupportedFormat { | 386 struct ReadPixelsSupportedFormat { |
390 GrGLenum fFormat; | 387 GrGLenum fFormat; |
391 GrGLenum fType; | 388 GrGLenum fType; |
392 GrGLenum fFboFormat; | 389 GrGLenum fFboFormat; |
393 | 390 |
394 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 391 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
395 return fFormat == rhs.fFormat | 392 return fFormat == rhs.fFormat |
396 && fType == rhs.fType | 393 && fType == rhs.fType |
397 && fFboFormat == rhs.fFboFormat; | 394 && fFboFormat == rhs.fFboFormat; |
398 } | 395 } |
399 }; | 396 }; |
400 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 397 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
401 | 398 |
402 typedef GrCaps INHERITED; | 399 typedef GrCaps INHERITED; |
403 }; | 400 }; |
404 | 401 |
405 #endif | 402 #endif |
OLD | NEW |