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 |
11 | 11 |
12 #include "GrDrawTargetCaps.h" | 12 #include "GrDrawTargetCaps.h" |
13 #include "GrGLStencilAttachment.h" | 13 #include "GrGLStencilAttachment.h" |
14 #include "SkChecksum.h" | 14 #include "SkChecksum.h" |
15 #include "SkTHash.h" | 15 #include "SkTHash.h" |
16 #include "SkTArray.h" | 16 #include "SkTArray.h" |
17 | 17 |
18 class GrGLContextInfo; | 18 class GrGLContextInfo; |
19 class GrGLSLCaps; | 19 class GrGLSLCaps; |
20 | 20 |
21 /** | 21 /** |
22 * Stores some capabilities of a GL context. Most are determined by the GL | 22 * Stores some capabilities of a GL context. Most are determined by the GL |
23 * version and the extensions string. It also tracks formats that have passed | 23 * version and the extensions string. It also tracks formats that have passed |
24 * the FBO completeness test. | 24 * the FBO completeness test. |
25 */ | 25 */ |
26 class GrGLCaps : public GrDrawTargetCaps { | 26 class GrGLCaps : public GrCaps { |
27 public: | 27 public: |
28 SK_DECLARE_INST_COUNT(GrGLCaps) | 28 SK_DECLARE_INST_COUNT(GrGLCaps) |
29 | 29 |
30 typedef GrGLStencilAttachment::Format StencilFormat; | 30 typedef GrGLStencilAttachment::Format StencilFormat; |
31 | 31 |
32 /** | 32 /** |
33 * The type of MSAA for FBOs supported. Different extensions have different | 33 * The type of MSAA for FBOs supported. Different extensions have different |
34 * semantics of how / when a resolve is performed. | 34 * semantics of how / when a resolve is performed. |
35 */ | 35 */ |
36 enum MSFBOType { | 36 enum MSFBOType { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 GrGLenum fFboFormat; | 364 GrGLenum fFboFormat; |
365 | 365 |
366 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 366 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
367 return fFormat == rhs.fFormat | 367 return fFormat == rhs.fFormat |
368 && fType == rhs.fType | 368 && fType == rhs.fType |
369 && fFboFormat == rhs.fFboFormat; | 369 && fFboFormat == rhs.fFboFormat; |
370 } | 370 } |
371 }; | 371 }; |
372 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 372 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
373 | 373 |
374 typedef GrDrawTargetCaps INHERITED; | 374 typedef GrCaps INHERITED; |
375 }; | 375 }; |
376 | 376 |
377 | 377 |
378 class GrGLSLCaps : public GrShaderCaps { | 378 class GrGLSLCaps : public GrShaderCaps { |
379 public: | 379 public: |
380 SK_DECLARE_INST_COUNT(GrGLSLCaps) | 380 SK_DECLARE_INST_COUNT(GrGLSLCaps) |
381 | 381 |
382 /** | 382 /** |
383 * Indicates how GLSL must interact with advanced blend equations. The KHR ex
tension requires | 383 * Indicates how GLSL must interact with advanced blend equations. The KHR ex
tension requires |
384 * special layout qualifiers in the fragment shader. | 384 * special layout qualifiers in the fragment shader. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 const char* fFBFetchColorName; | 455 const char* fFBFetchColorName; |
456 const char* fFBFetchExtensionString; | 456 const char* fFBFetchExtensionString; |
457 | 457 |
458 AdvBlendEqInteraction fAdvBlendEqInteraction; | 458 AdvBlendEqInteraction fAdvBlendEqInteraction; |
459 | 459 |
460 typedef GrShaderCaps INHERITED; | 460 typedef GrShaderCaps INHERITED; |
461 }; | 461 }; |
462 | 462 |
463 | 463 |
464 #endif | 464 #endif |
OLD | NEW |