Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 23359002: Use indexed extensions on ES3. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 357
358 // Dual source blending 358 // Dual source blending
359 if (kDesktop_GrGLBinding == binding && 359 if (kDesktop_GrGLBinding == binding &&
360 (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended") )) { 360 (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_blend_func_extended") )) {
361 if (NULL == fBindFragDataLocationIndexed) { 361 if (NULL == fBindFragDataLocationIndexed) {
362 return false; 362 return false;
363 } 363 }
364 } 364 }
365 365
366 if (kDesktop_GrGLBinding == binding && glVer >= GR_GL_VER(3, 0)) { 366 // glGetStringi was added in version 3.0 of both desktop and ES.
367 if (glVer >= GR_GL_VER(3, 0)) {
367 if (NULL == fGetStringi) { 368 if (NULL == fGetStringi) {
368 return false; 369 return false;
369 } 370 }
370 } 371 }
371 372
372 if (kDesktop_GrGLBinding == binding) { 373 if (kDesktop_GrGLBinding == binding) {
373 if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_obje ct")) { 374 if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_obje ct")) {
374 if (NULL == fBindVertexArray || 375 if (NULL == fBindVertexArray ||
375 NULL == fDeleteVertexArrays || 376 NULL == fDeleteVertexArrays ||
376 NULL == fGenVertexArrays) { 377 NULL == fGenVertexArrays) {
377 return false; 378 return false;
378 } 379 }
379 } 380 }
380 } else { 381 } else {
381 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_OES_vertex_array_objec t")) { 382 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_OES_vertex_array_objec t")) {
382 if (NULL == fBindVertexArray || 383 if (NULL == fBindVertexArray ||
383 NULL == fDeleteVertexArrays || 384 NULL == fDeleteVertexArrays ||
384 NULL == fGenVertexArrays) { 385 NULL == fGenVertexArrays) {
385 return false; 386 return false;
386 } 387 }
387 } 388 }
388 } 389 }
389 390
390 return true; 391 return true;
391 } 392 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698