| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
| 10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (NULL == fFunctions.fTexStorage2D) { | 299 if (NULL == fFunctions.fTexStorage2D) { |
| 300 RETURN_FALSE_INTERFACE | 300 RETURN_FALSE_INTERFACE |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storag
e")) { | 303 } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storag
e")) { |
| 304 if (NULL == fFunctions.fTexStorage2D) { | 304 if (NULL == fFunctions.fTexStorage2D) { |
| 305 RETURN_FALSE_INTERFACE | 305 RETURN_FALSE_INTERFACE |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 // glTextureBarrier is part of desktop 4.5. There are also ARB and NV extens
ions. |
| 310 if (kGL_GrGLStandard == fStandard) { |
| 311 if (glVer >= GR_GL_VER(4,5) || |
| 312 fExtensions.has("GL_ARB_texture_barrier") || |
| 313 fExtensions.has("GL_NV_texture_barrier")) { |
| 314 if (NULL == fFunctions.fTextureBarrier) { |
| 315 RETURN_FALSE_INTERFACE |
| 316 } |
| 317 } |
| 318 } else if (fExtensions.has("GL_NV_texture_barrier")) { |
| 319 if (NULL == fFunctions.fTextureBarrier) { |
| 320 RETURN_FALSE_INTERFACE |
| 321 } |
| 322 } |
| 323 |
| 309 if (fExtensions.has("GL_EXT_discard_framebuffer")) { | 324 if (fExtensions.has("GL_EXT_discard_framebuffer")) { |
| 310 // FIXME: Remove this once Chromium is updated to provide this function | 325 // FIXME: Remove this once Chromium is updated to provide this function |
| 311 #if 0 | 326 #if 0 |
| 312 if (NULL == fFunctions.fDiscardFramebuffer) { | 327 if (NULL == fFunctions.fDiscardFramebuffer) { |
| 313 RETURN_FALSE_INTERFACE | 328 RETURN_FALSE_INTERFACE |
| 314 } | 329 } |
| 315 #endif | 330 #endif |
| 316 } | 331 } |
| 317 | 332 |
| 318 // FBO MSAA | 333 // FBO MSAA |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 } | 521 } |
| 507 | 522 |
| 508 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { | 523 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { |
| 509 if (NULL == fFunctions.fCoverageModulation) { | 524 if (NULL == fFunctions.fCoverageModulation) { |
| 510 RETURN_FALSE_INTERFACE | 525 RETURN_FALSE_INTERFACE |
| 511 } | 526 } |
| 512 } | 527 } |
| 513 | 528 |
| 514 return true; | 529 return true; |
| 515 } | 530 } |
| OLD | NEW |