| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 srgbSupport = true; | 199 srgbSupport = true; |
| 200 } else if (ctxInfo.hasExtension("GL_EXT_texture_sRGB")) { | 200 } else if (ctxInfo.hasExtension("GL_EXT_texture_sRGB")) { |
| 201 if (ctxInfo.hasExtension("GL_ARB_framebuffer_sRGB") || | 201 if (ctxInfo.hasExtension("GL_ARB_framebuffer_sRGB") || |
| 202 ctxInfo.hasExtension("GL_EXT_framebuffer_sRGB")) { | 202 ctxInfo.hasExtension("GL_EXT_framebuffer_sRGB")) { |
| 203 srgbSupport = true; | 203 srgbSupport = true; |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 // All the above srgb extensions support toggling srgb writes | 206 // All the above srgb extensions support toggling srgb writes |
| 207 fSRGBWriteControl = srgbSupport; | 207 fSRGBWriteControl = srgbSupport; |
| 208 } else { | 208 } else { |
| 209 srgbSupport = ctxInfo.version() >= GR_GL_VER(3,0) || | 209 // See http://skbug.com/4148 for PowerVR issue. |
| 210 ctxInfo.hasExtension("GL_EXT_sRGB"); | 210 srgbSupport = kPowerVRRogue_GrGLRenderer != ctxInfo.renderer() && |
| 211 (ctxInfo.version() >= GR_GL_VER(3,0) || ctxInfo.hasExtensi
on("GL_EXT_sRGB")); |
| 211 // ES through 3.1 requires EXT_srgb_write_control to support toggling | 212 // ES through 3.1 requires EXT_srgb_write_control to support toggling |
| 212 // sRGB writing for destinations. | 213 // sRGB writing for destinations. |
| 213 fSRGBWriteControl = ctxInfo.hasExtension("GL_EXT_sRGB_write_control"); | 214 fSRGBWriteControl = ctxInfo.hasExtension("GL_EXT_sRGB_write_control"); |
| 214 } | 215 } |
| 215 | 216 |
| 216 // Frag Coords Convention support is not part of ES | 217 // Frag Coords Convention support is not part of ES |
| 217 // Known issue on at least some Intel platforms: | 218 // Known issue on at least some Intel platforms: |
| 218 // http://code.google.com/p/skia/issues/detail?id=946 | 219 // http://code.google.com/p/skia/issues/detail?id=946 |
| 219 if (kIntel_GrGLVendor != ctxInfo.vendor() && kGLES_GrGLStandard != standard)
{ | 220 if (kIntel_GrGLVendor != ctxInfo.vendor() && kGLES_GrGLStandard != standard)
{ |
| 220 fFragCoordsConventionSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGe
neration || | 221 fFragCoordsConventionSupport = ctxInfo.glslGeneration() >= k150_GrGLSLGe
neration || |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1207 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1207 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1208 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
| 1208 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1209 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
| 1209 } | 1210 } |
| 1210 } | 1211 } |
| 1211 } | 1212 } |
| 1212 | 1213 |
| 1213 | 1214 |
| 1214 | 1215 |
| 1215 | 1216 |
| OLD | NEW |