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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { | 417 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { |
418 fMipMapSupport = false; | 418 fMipMapSupport = false; |
419 } | 419 } |
420 | 420 |
421 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 421 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
422 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 422 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
423 // Our render targets are always created with textures as the color | 423 // Our render targets are always created with textures as the color |
424 // attachment, hence this min: | 424 // attachment, hence this min: |
425 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); | 425 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
426 | 426 |
427 // This GPU seems to have problems when tiling small textures | |
428 if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer()) { | |
429 fMinTextureSize = 16; | |
430 } | |
431 | |
432 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); | 427 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |
433 | 428 |
434 // Disable scratch texture reuse on Mali and Adreno devices | 429 // Disable scratch texture reuse on Mali and Adreno devices |
435 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && | 430 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && |
436 kQualcomm_GrGLVendor != ctxInfo.vendor(); | 431 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
437 | 432 |
438 #if 0 | 433 #if 0 |
439 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() && | 434 fReuseScratchBuffers = kARM_GrGLVendor != ctxInfo.vendor() && |
440 kQualcomm_GrGLVendor != ctxInfo.vendor(); | 435 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
441 #endif | 436 #endif |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1272 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1278 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1273 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1279 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1274 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1280 } | 1275 } |
1281 } | 1276 } |
1282 } | 1277 } |
1283 | 1278 |
1284 | 1279 |
1285 | 1280 |
1286 | 1281 |
OLD | NEW |