| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // to alllow arbitrary wrap modes, however. | 287 // to alllow arbitrary wrap modes, however. |
| 288 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); | 288 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); |
| 289 } | 289 } |
| 290 | 290 |
| 291 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 291 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
| 292 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 292 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
| 293 // Our render targets are always created with textures as the color | 293 // Our render targets are always created with textures as the color |
| 294 // attachment, hence this min: | 294 // attachment, hence this min: |
| 295 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); | 295 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
| 296 | 296 |
| 297 // This GPU seems to have problems when tiling small textures |
| 298 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { |
| 299 fMinTextureSize = 16; |
| 300 } |
| 301 |
| 297 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); | 302 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |
| 298 | 303 |
| 299 // Disable scratch texture reuse on Mali and Adreno devices | 304 // Disable scratch texture reuse on Mali and Adreno devices |
| 300 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && | 305 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && |
| 301 kQualcomm_GrGLVendor != ctxInfo.vendor(); | 306 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
| 302 | 307 |
| 303 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) { | 308 if (GrGLCaps::kES_IMG_MsToTexture_MSFBOType == fMSFBOType) { |
| 304 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxSampleCount); | 309 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES_IMG, &fMaxSampleCount); |
| 305 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) { | 310 } else if (GrGLCaps::kNone_MSFBOType != fMSFBOType) { |
| 306 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxSampleCount); | 311 GR_GL_GetIntegerv(gli, GR_GL_MAX_SAMPLES, &fMaxSampleCount); |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 if (fGeometryShaderSupport) { | 1114 if (fGeometryShaderSupport) { |
| 1110 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1115 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1111 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1116 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1112 } | 1117 } |
| 1113 } | 1118 } |
| 1114 } | 1119 } |
| 1115 | 1120 |
| 1116 | 1121 |
| 1117 | 1122 |
| 1118 | 1123 |
| OLD | NEW |