| 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 #include "GrGLCaps.h" | 9 #include "GrGLCaps.h" |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 if (kGL_GrGLStandard == standard) { | 121 if (kGL_GrGLStandard == standard) { |
| 122 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || | 122 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || |
| 123 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| | 123 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| |
| 124 ctxInfo.hasExtension("GL_NV_texture_barrier"); | 124 ctxInfo.hasExtension("GL_NV_texture_barrier"); |
| 125 } else { | 125 } else { |
| 126 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); | 126 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); |
| 127 } | 127 } |
| 128 | 128 |
| 129 if (kGL_GrGLStandard == standard) { | |
| 130 fSampleLocationsSupport = version >= GR_GL_VER(3,2) || | |
| 131 ctxInfo.hasExtension("GL_ARB_texture_multisamp
le"); | |
| 132 } else { | |
| 133 fSampleLocationsSupport = version >= GR_GL_VER(3,1); | |
| 134 } | |
| 135 | |
| 136 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED | 129 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED |
| 137 // and GL_RG on FBO textures. | 130 // and GL_RG on FBO textures. |
| 138 if (kMesa_GrGLDriver != ctxInfo.driver()) { | 131 if (kMesa_GrGLDriver != ctxInfo.driver()) { |
| 139 if (kGL_GrGLStandard == standard) { | 132 if (kGL_GrGLStandard == standard) { |
| 140 fTextureRedSupport = version >= GR_GL_VER(3,0) || | 133 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
| 141 ctxInfo.hasExtension("GL_ARB_texture_rg"); | 134 ctxInfo.hasExtension("GL_ARB_texture_rg"); |
| 142 } else { | 135 } else { |
| 143 fTextureRedSupport = version >= GR_GL_VER(3,0) || | 136 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
| 144 ctxInfo.hasExtension("GL_EXT_texture_rg"); | 137 ctxInfo.hasExtension("GL_EXT_texture_rg"); |
| 145 } | 138 } |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1734 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
| 1742 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1735 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
| 1743 fConfigTable[i].fFormats.fExternalFormat[j]); | 1736 fConfigTable[i].fFormats.fExternalFormat[j]); |
| 1744 } | 1737 } |
| 1745 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1738 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
| 1746 } | 1739 } |
| 1747 #endif | 1740 #endif |
| 1748 } | 1741 } |
| 1749 | 1742 |
| 1750 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1743 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| OLD | NEW |