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")) { |
| 299 // FIXME: Remove this once Chromium is updated to provide this function |
| 300 #if 0 |
| 301 if (NULL == fDiscardFramebuffer) { |
| 302 return false; |
| 303 } |
| 304 #endif |
| 305 } |
| 306 |
298 // FBO MSAA | 307 // FBO MSAA |
299 if (kDesktop_GrGLBinding == binding) { | 308 if (kDesktop_GrGLBinding == binding) { |
300 // GL 3.0 and the ARB extension have multisample + blit | 309 // GL 3.0 and the ARB extension have multisample + blit |
301 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object
")) { | 310 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object
")) { |
302 if (NULL == fRenderbufferStorageMultisample || | 311 if (NULL == fRenderbufferStorageMultisample || |
303 NULL == fBlitFramebuffer) { | 312 NULL == fBlitFramebuffer) { |
304 return false; | 313 return false; |
305 } | 314 } |
306 } else { | 315 } else { |
307 if (extensions.has("GL_EXT_framebuffer_blit") && | 316 if (extensions.has("GL_EXT_framebuffer_blit") && |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 if (NULL == fBindVertexArray || | 380 if (NULL == fBindVertexArray || |
372 NULL == fDeleteVertexArrays || | 381 NULL == fDeleteVertexArrays || |
373 NULL == fGenVertexArrays) { | 382 NULL == fGenVertexArrays) { |
374 return false; | 383 return false; |
375 } | 384 } |
376 } | 385 } |
377 } | 386 } |
378 | 387 |
379 return true; | 388 return true; |
380 } | 389 } |
OLD | NEW |