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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 | 282 |
283 // GL_EXT_texture_storage is part of desktop 4.2 | 283 // GL_EXT_texture_storage is part of desktop 4.2 |
284 // There is a desktop ARB extension and an ES+desktop EXT extension | 284 // There is a desktop ARB extension and an ES+desktop EXT extension |
285 if (kDesktop_GrGLBinding == binding) { | 285 if (kDesktop_GrGLBinding == binding) { |
286 if (glVer >= GR_GL_VER(4,2) || | 286 if (glVer >= GR_GL_VER(4,2) || |
287 extensions.has("GL_ARB_texture_storage") || | 287 extensions.has("GL_ARB_texture_storage") || |
288 extensions.has("GL_EXT_texture_storage")) { | 288 extensions.has("GL_EXT_texture_storage")) { |
289 if (NULL == fTexStorage2D) { | 289 if (NULL == fTexStorage2D) { |
290 return false; | 290 return false; |
291 } | 291 } |
292 } | 292 } |
robertphillips
2013/08/21 12:56:48
Don't we need the Qualcomm clause here too?
bsalomon
2013/08/21 13:50:19
I don't think so. We want the client to always giv
| |
293 } else if (extensions.has("GL_EXT_texture_storage")) { | 293 } else if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_EXT_texture_storage ")) { |
294 if (NULL == fTexStorage2D) { | 294 if (NULL == fTexStorage2D) { |
295 return false; | 295 return false; |
296 } | 296 } |
297 } | 297 } |
298 | 298 |
299 if (extensions.has("GL_EXT_discard_framebuffer")) { | 299 if (extensions.has("GL_EXT_discard_framebuffer")) { |
300 // FIXME: Remove this once Chromium is updated to provide this function | 300 // FIXME: Remove this once Chromium is updated to provide this function |
301 #if 0 | 301 #if 0 |
302 if (NULL == fDiscardFramebuffer) { | 302 if (NULL == fDiscardFramebuffer) { |
303 return false; | 303 return false; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 if (NULL == fBindVertexArray || | 382 if (NULL == fBindVertexArray || |
383 NULL == fDeleteVertexArrays || | 383 NULL == fDeleteVertexArrays || |
384 NULL == fGenVertexArrays) { | 384 NULL == fGenVertexArrays) { |
385 return false; | 385 return false; |
386 } | 386 } |
387 } | 387 } |
388 } | 388 } |
389 | 389 |
390 return true; | 390 return true; |
391 } | 391 } |
OLD | NEW |