| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 fFBFetchColorName = NULL; | 935 fFBFetchColorName = NULL; |
| 936 fFBFetchExtensionString = NULL; | 936 fFBFetchExtensionString = NULL; |
| 937 } | 937 } |
| 938 | 938 |
| 939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() { | 939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() { |
| 940 *this = caps; | 940 *this = caps; |
| 941 } | 941 } |
| 942 | 942 |
| 943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) { | 943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) { |
| 944 INHERITED::operator=(caps); | 944 INHERITED::operator=(caps); |
| 945 fGLSLGeneration = caps.fGLSLGeneration; |
| 945 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; | 946 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; |
| 946 fFBFetchSupport = caps.fFBFetchSupport; | 947 fFBFetchSupport = caps.fFBFetchSupport; |
| 947 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; | 948 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; |
| 948 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction; | 949 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction; |
| 949 fFBFetchColorName = caps.fFBFetchColorName; | 950 fFBFetchColorName = caps.fFBFetchColorName; |
| 950 fFBFetchExtensionString = caps.fFBFetchExtensionString; | 951 fFBFetchExtensionString = caps.fFBFetchExtensionString; |
| 951 | 952 |
| 952 return *this; | 953 return *this; |
| 953 } | 954 } |
| 954 | 955 |
| 955 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, | 956 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, |
| 956 const GrGLInterface* gli, | 957 const GrGLInterface* gli, |
| 957 const GrGLCaps& glCaps) { | 958 const GrGLCaps& glCaps) { |
| 958 this->reset(); | 959 this->reset(); |
| 959 if (!ctxInfo.isInitialized()) { | 960 if (!ctxInfo.isInitialized()) { |
| 960 return false; | 961 return false; |
| 961 } | 962 } |
| 962 | 963 |
| 964 fGLSLGeneration = ctxInfo.glslGeneration(); |
| 965 |
| 963 GrGLStandard standard = ctxInfo.standard(); | 966 GrGLStandard standard = ctxInfo.standard(); |
| 964 GrGLVersion version = ctxInfo.version(); | 967 GrGLVersion version = ctxInfo.version(); |
| 965 | 968 |
| 966 /************************************************************************** | 969 /************************************************************************** |
| 967 * Caps specific to GrGLSLCaps | 970 * Caps specific to GrGLSLCaps |
| 968 **************************************************************************/ | 971 **************************************************************************/ |
| 969 | 972 |
| 970 if (kGLES_GrGLStandard == standard) { | 973 if (kGLES_GrGLStandard == standard) { |
| 971 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { | 974 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { |
| 972 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); | 975 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 if (fGeometryShaderSupport) { | 1152 if (fGeometryShaderSupport) { |
| 1150 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1153 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1151 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1154 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1152 } | 1155 } |
| 1153 } | 1156 } |
| 1154 } | 1157 } |
| 1155 | 1158 |
| 1156 | 1159 |
| 1157 | 1160 |
| 1158 | 1161 |
| OLD | NEW |