| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 * Instead the texture is multisampled when bound to the FBO and then re
solved automatically | 58 * Instead the texture is multisampled when bound to the FBO and then re
solved automatically |
| 59 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi
ch we call | 59 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi
ch we call |
| 60 * GR_GL_MAX_SAMPLES_IMG). | 60 * GR_GL_MAX_SAMPLES_IMG). |
| 61 */ | 61 */ |
| 62 kES_IMG_MsToTexture_MSFBOType, | 62 kES_IMG_MsToTexture_MSFBOType, |
| 63 /** | 63 /** |
| 64 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but
uses the standard | 64 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but
uses the standard |
| 65 * GL_MAX_SAMPLES value. | 65 * GL_MAX_SAMPLES value. |
| 66 */ | 66 */ |
| 67 kES_EXT_MsToTexture_MSFBOType, | 67 kES_EXT_MsToTexture_MSFBOType, |
| 68 /** |
| 69 * GL_NV_framebuffer_mixed_samples. |
| 70 */ |
| 71 kStencil_MSFBOType, |
| 68 | 72 |
| 69 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType | 73 kLast_MSFBOType = kStencil_MSFBOType |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 enum InvalidateFBType { | 76 enum InvalidateFBType { |
| 73 kNone_InvalidateFBType, | 77 kNone_InvalidateFBType, |
| 74 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() | 78 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() |
| 75 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() | 79 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() |
| 76 | 80 |
| 77 kLast_InvalidateFBType = kInvalidate_InvalidateFBType | 81 kLast_InvalidateFBType = kInvalidate_InvalidateFBType |
| 78 }; | 82 }; |
| 79 | 83 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 * Reports the type of MSAA FBO support. | 150 * Reports the type of MSAA FBO support. |
| 147 */ | 151 */ |
| 148 MSFBOType msFBOType() const { return fMSFBOType; } | 152 MSFBOType msFBOType() const { return fMSFBOType; } |
| 149 | 153 |
| 150 /** | 154 /** |
| 151 * Does the supported MSAA FBO extension have MSAA renderbuffers? | 155 * Does the supported MSAA FBO extension have MSAA renderbuffers? |
| 152 */ | 156 */ |
| 153 bool usesMSAARenderBuffers() const { | 157 bool usesMSAARenderBuffers() const { |
| 154 return kNone_MSFBOType != fMSFBOType && | 158 return kNone_MSFBOType != fMSFBOType && |
| 155 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && | 159 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && |
| 156 kES_EXT_MsToTexture_MSFBOType != fMSFBOType; | 160 kES_EXT_MsToTexture_MSFBOType != fMSFBOType && |
| 161 kStencil_MSFBOType != fMSFBOType; |
| 157 } | 162 } |
| 158 | 163 |
| 159 /** | 164 /** |
| 160 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and | 165 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and |
| 161 * then implicitly resolved when read. | 166 * then implicitly resolved when read. |
| 162 */ | 167 */ |
| 163 bool usesImplicitMSAAResolve() const { | 168 bool usesImplicitMSAAResolve() const { |
| 164 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 169 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |
| 165 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 170 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |
| 166 } | 171 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 } | 421 } |
| 417 }; | 422 }; |
| 418 | 423 |
| 419 mutable SkTHashMap<ReadPixelsSupportedFormat, bool, ReadPixelsSupportedForma
t::Hash> | 424 mutable SkTHashMap<ReadPixelsSupportedFormat, bool, ReadPixelsSupportedForma
t::Hash> |
| 420 fReadPixelsSupportedCache; | 425 fReadPixelsSupportedCache; |
| 421 | 426 |
| 422 typedef GrDrawTargetCaps INHERITED; | 427 typedef GrDrawTargetCaps INHERITED; |
| 423 }; | 428 }; |
| 424 | 429 |
| 425 #endif | 430 #endif |
| OLD | NEW |