Chromium Code Reviews| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 if (NULL == fTexStorage2D) { | 288 if (NULL == fTexStorage2D) { |
| 289 return false; | 289 return false; |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 } else if (extensions.has("GL_EXT_texture_storage")) { | 292 } else if (extensions.has("GL_EXT_texture_storage")) { |
| 293 if (NULL == fTexStorage2D) { | 293 if (NULL == fTexStorage2D) { |
| 294 return false; | 294 return false; |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 | 297 |
| 298 if (extensions.has("GL_EXT_discard_framebuffer")) { | |
|
bsalomon
2013/04/29 14:42:15
Might be worth checking if Chrome passes along thi
robertphillips
2013/04/29 15:25:39
Done.
| |
| 299 if (NULL == fDiscardFramebuffer) { | |
| 300 return false; | |
| 301 } | |
| 302 } | |
| 303 | |
| 298 // FBO MSAA | 304 // FBO MSAA |
| 299 if (kDesktop_GrGLBinding == binding) { | 305 if (kDesktop_GrGLBinding == binding) { |
| 300 // GL 3.0 and the ARB extension have multisample + blit | 306 // GL 3.0 and the ARB extension have multisample + blit |
| 301 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object ")) { | 307 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object ")) { |
| 302 if (NULL == fRenderbufferStorageMultisample || | 308 if (NULL == fRenderbufferStorageMultisample || |
| 303 NULL == fBlitFramebuffer) { | 309 NULL == fBlitFramebuffer) { |
| 304 return false; | 310 return false; |
| 305 } | 311 } |
| 306 } else { | 312 } else { |
| 307 if (extensions.has("GL_EXT_framebuffer_blit") && | 313 if (extensions.has("GL_EXT_framebuffer_blit") && |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 if (NULL == fBindVertexArray || | 377 if (NULL == fBindVertexArray || |
| 372 NULL == fDeleteVertexArrays || | 378 NULL == fDeleteVertexArrays || |
| 373 NULL == fGenVertexArrays) { | 379 NULL == fGenVertexArrays) { |
| 374 return false; | 380 return false; |
| 375 } | 381 } |
| 376 } | 382 } |
| 377 } | 383 } |
| 378 | 384 |
| 379 return true; | 385 return true; |
| 380 } | 386 } |
| OLD | NEW |