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

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

Issue 1451683002: Initial version of external_oes texture support and unit test (Closed) Base URL: https://skia.googlesource.com/skia.git@target
Patch Set: again Created 5 years 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
« no previous file with comments | « src/gpu/GrResourceProvider.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrGLAssembleInterface.h" 10 #include "GrGLAssembleInterface.h"
11 #include "GrGLUtil.h" 11 #include "GrGLUtil.h"
12 12
13 #define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F) 13 #define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F)
14 #define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, " gl" #F #S) 14 #define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, " gl" #F #S)
15 #define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl " #F) 15 #define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl " #F)
16 16
17 #define GET_EGL_PROC_SUFFIX(F, S) functions->f ## F = (GrEGL ## F ## Proc) get(c tx, "egl" #F #S) 17 #define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) ge t(ctx, "egl" #F #S)
18 18
19 const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get) { 19 const GrGLInterface* GrGLAssembleInterface(void* ctx, GrGLGetProc get) {
20 GET_PROC_LOCAL(GetString); 20 GET_PROC_LOCAL(GetString);
21 if (nullptr == GetString) { 21 if (nullptr == GetString) {
22 return nullptr; 22 return nullptr;
23 } 23 }
24 24
25 const char* verStr = reinterpret_cast<const char*>(GetString(GR_GL_VERSION)) ; 25 const char* verStr = reinterpret_cast<const char*>(GetString(GR_GL_VERSION)) ;
26 if (nullptr == verStr) { 26 if (nullptr == verStr) {
27 return nullptr; 27 return nullptr;
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base")) { 799 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base")) {
800 GET_EGL_PROC_SUFFIX(CreateImage, KHR); 800 GET_EGL_PROC_SUFFIX(CreateImage, KHR);
801 GET_EGL_PROC_SUFFIX(DestroyImage, KHR); 801 GET_EGL_PROC_SUFFIX(DestroyImage, KHR);
802 } 802 }
803 803
804 interface->fStandard = kGLES_GrGLStandard; 804 interface->fStandard = kGLES_GrGLStandard;
805 interface->fExtensions.swap(&extensions); 805 interface->fExtensions.swap(&extensions);
806 806
807 return interface; 807 return interface;
808 } 808 }
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698