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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 if (extensions.has("GL_EXT_framebuffer_blit") && | 317 if (extensions.has("GL_EXT_framebuffer_blit") && |
| 318 NULL == fBlitFramebuffer) { | 318 NULL == fBlitFramebuffer) { |
| 319 return false; | 319 return false; |
| 320 } | 320 } |
| 321 if (extensions.has("GL_EXT_framebuffer_multisample") && | 321 if (extensions.has("GL_EXT_framebuffer_multisample") && |
| 322 NULL == fRenderbufferStorageMultisample) { | 322 NULL == fRenderbufferStorageMultisample) { |
| 323 return false; | 323 return false; |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 } else { | 326 } else { |
| 327 #if GR_GL_IGNORE_ES3_MSAA | |
|
robertphillips
2013/08/23 17:25:34
can we share the second two if blocks between the
bsalomon
2013/08/23 17:28:49
I think not, see responses below. The plan is to d
| |
| 327 if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { | 328 if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { |
| 328 if (NULL == fRenderbufferStorageMultisample || | 329 if (NULL == fRenderbufferStorageMultisample || |
| 329 NULL == fBlitFramebuffer) { | 330 NULL == fBlitFramebuffer) { |
| 330 return false; | 331 return false; |
| 331 } | 332 } |
| 333 } else if (extensions.has("GL_APPLE_framebuffer_multisample")) { | |
|
robertphillips
2013/08/23 17:25:34
why not fRenderbufferStorageMultisampleES2APPLE?
bsalomon
2013/08/23 17:28:49
That doesn't exist when GR_GL_IGNORE_ES3_MSAA is t
| |
| 334 if (NULL == fRenderbufferStorageMultisample || | |
| 335 NULL == fResolveMultisampleFramebuffer) { | |
| 336 return false; | |
| 337 } | |
| 338 } else if (extensions.has("GL_IMG_multisampled_render_to_texture") || | |
| 339 extensions.has("GL_EXT_multisampled_render_to_texture")) { | |
|
robertphillips
2013/08/23 17:25:34
why not fRenderbufferStorageMultisampleES2EXT?
bsalomon
2013/08/23 17:28:49
ditto
| |
| 340 if (NULL == fRenderbufferStorageMultisample || | |
| 341 NULL == fFramebufferTexture2DMultisample) { | |
| 342 return false; | |
| 343 } | |
| 344 } | |
| 345 #else | |
| 346 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_CHROMIUM_framebuffer_m ultisample")) { | |
| 347 if (NULL == fRenderbufferStorageMultisample || | |
| 348 NULL == fBlitFramebuffer) { | |
| 349 return false; | |
| 350 } | |
| 332 } | 351 } |
| 333 if (extensions.has("GL_APPLE_framebuffer_multisample")) { | 352 if (extensions.has("GL_APPLE_framebuffer_multisample")) { |
| 334 if (NULL == fRenderbufferStorageMultisample || | 353 if (NULL == fRenderbufferStorageMultisampleES2APPLE || |
| 335 NULL == fResolveMultisampleFramebuffer) { | 354 NULL == fResolveMultisampleFramebuffer) { |
| 336 return false; | 355 return false; |
| 337 } | 356 } |
| 338 } | 357 } |
| 339 if (extensions.has("GL_IMG_multisampled_render_to_texture") || | 358 if (extensions.has("GL_IMG_multisampled_render_to_texture") || |
| 340 extensions.has("GL_EXT_multisampled_render_to_texture")) { | 359 extensions.has("GL_EXT_multisampled_render_to_texture")) { |
| 341 if (NULL == fRenderbufferStorageMultisample || | 360 if (NULL == fRenderbufferStorageMultisampleES2EXT || |
| 342 NULL == fFramebufferTexture2DMultisample) { | 361 NULL == fFramebufferTexture2DMultisample) { |
| 343 return false; | 362 return false; |
| 344 } | 363 } |
| 345 } | 364 } |
| 365 #endif | |
| 346 } | 366 } |
| 347 | 367 |
| 348 // On ES buffer mapping is an extension. On Desktop | 368 // On ES buffer mapping is an extension. On Desktop |
| 349 // buffer mapping was part of original VBO extension | 369 // buffer mapping was part of original VBO extension |
| 350 // which we require. | 370 // which we require. |
| 351 if (kDesktop_GrGLBinding == binding || extensions.has("GL_OES_mapbuffer")) { | 371 if (kDesktop_GrGLBinding == binding || extensions.has("GL_OES_mapbuffer")) { |
| 352 if (NULL == fMapBuffer || | 372 if (NULL == fMapBuffer || |
| 353 NULL == fUnmapBuffer) { | 373 NULL == fUnmapBuffer) { |
| 354 return false; | 374 return false; |
| 355 } | 375 } |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 382 if (NULL == fBindVertexArray || | 402 if (NULL == fBindVertexArray || |
| 383 NULL == fDeleteVertexArrays || | 403 NULL == fDeleteVertexArrays || |
| 384 NULL == fGenVertexArrays) { | 404 NULL == fGenVertexArrays) { |
| 385 return false; | 405 return false; |
| 386 } | 406 } |
| 387 } | 407 } |
| 388 } | 408 } |
| 389 | 409 |
| 390 return true; | 410 return true; |
| 391 } | 411 } |
| OLD | NEW |