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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. | 229 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte
nt. |
230 bool useNonVBOVertexAndIndexDynamicData() const { | 230 bool useNonVBOVertexAndIndexDynamicData() const { |
231 return fUseNonVBOVertexAndIndexDynamicData; | 231 return fUseNonVBOVertexAndIndexDynamicData; |
232 } | 232 } |
233 | 233 |
234 /// Does ReadPixels support the provided format/type combo? | 234 /// Does ReadPixels support the provided format/type combo? |
235 bool readPixelsSupported(const GrGLInterface* intf, | 235 bool readPixelsSupported(const GrGLInterface* intf, |
236 GrGLenum format, | 236 GrGLenum format, |
237 GrGLenum type, | 237 GrGLenum type, |
238 GrGLenum currFboFormat) const; | 238 GrPixelConfig currRTConfig) const; |
239 | 239 |
240 bool isCoreProfile() const { return fIsCoreProfile; } | 240 bool isCoreProfile() const { return fIsCoreProfile; } |
241 | 241 |
242 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } | 242 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo
rt; } |
243 | 243 |
244 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport
; } | 244 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport
; } |
245 | 245 |
246 /// Are textures with GL_TEXTURE_EXTERNAL_OES type supported. | 246 /// Are textures with GL_TEXTURE_EXTERNAL_OES type supported. |
247 bool externalTextureSupport() const { return fExternalTextureSupport; } | 247 bool externalTextureSupport() const { return fExternalTextureSupport; } |
248 | 248 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 371 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
372 bool fIsCoreProfile : 1; | 372 bool fIsCoreProfile : 1; |
373 bool fBindFragDataLocationSupport : 1; | 373 bool fBindFragDataLocationSupport : 1; |
374 bool fSRGBWriteControl : 1; | 374 bool fSRGBWriteControl : 1; |
375 bool fRGBA8888PixelsOpsAreSlow : 1; | 375 bool fRGBA8888PixelsOpsAreSlow : 1; |
376 bool fPartialFBOReadIsSlow : 1; | 376 bool fPartialFBOReadIsSlow : 1; |
377 bool fBindUniformLocationSupport : 1; | 377 bool fBindUniformLocationSupport : 1; |
378 bool fExternalTextureSupport : 1; | 378 bool fExternalTextureSupport : 1; |
379 | 379 |
380 struct ReadPixelsSupportedFormat { | 380 struct ReadPixelsSupportedFormat { |
381 GrGLenum fFormat; | 381 ReadPixelsSupportedFormat() { memset(this, 0, sizeof(ReadPixelsSupported
Format)); } |
382 GrGLenum fType; | 382 ReadPixelsSupportedFormat(GrGLenum format, GrGLenum type, GrPixelConfig
rtConfig) { |
383 GrGLenum fFboFormat; | 383 memset(this, 0, sizeof(ReadPixelsSupportedFormat)); |
| 384 fFormat = format; |
| 385 fType = type; |
| 386 fRTConfig = rtConfig; |
| 387 } |
| 388 |
| 389 GrGLenum fFormat; |
| 390 GrGLenum fType; |
| 391 GrPixelConfig fRTConfig; |
384 | 392 |
385 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 393 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
386 return fFormat == rhs.fFormat | 394 return fFormat == rhs.fFormat |
387 && fType == rhs.fType | 395 && fType == rhs.fType |
388 && fFboFormat == rhs.fFboFormat; | 396 && fRTConfig == rhs.fRTConfig; |
389 } | 397 } |
390 }; | 398 }; |
391 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 399 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
392 | 400 |
393 typedef GrCaps INHERITED; | 401 typedef GrCaps INHERITED; |
394 }; | 402 }; |
395 | 403 |
396 #endif | 404 #endif |
OLD | NEW |