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

Unified Diff: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp

Issue 140823003: Move GrGLExtensions from GrGLContextInfo to GrGLInterface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Android Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/SkGLContextHelper.cpp ('k') | src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 03eaa3292a149b67e14d0535c6c9fa3923df4d5e..35de7f4d36e3f78c0a7e76fb2dd80e1de2016f9c 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -17,8 +17,8 @@
#include <EGL/egl.h>
-static const GrGLInterface* create_es_interface(GrGLVersion version,
- const GrGLExtensions& extensions) {
+static GrGLInterface* create_es_interface(GrGLVersion version,
+ const GrGLExtensions& extensions) {
if (version < GR_GL_VER(2,0)) {
return NULL;
}
@@ -192,8 +192,8 @@ static const GrGLInterface* create_es_interface(GrGLVersion version,
return interface;
}
-static const GrGLInterface* create_desktop_interface(GrGLVersion version,
- const GrGLExtensions& extensions) {
+static GrGLInterface* create_desktop_interface(GrGLVersion version,
+ const GrGLExtensions& extensions) {
// Currently this assumes a 4.4 context or later. Supporting lower GL versions would require
// getting suffixed versions of pointers for supported extensions.
if (version < GR_GL_VER(4,4)) {
@@ -403,11 +403,16 @@ const GrGLInterface* GrGLCreateNativeInterface() {
return NULL;
}
+ GrGLInterface* interface = NULL;
if (kGLES_GrGLStandard == standard) {
- return create_es_interface(version, extensions);
+ interface = create_es_interface(version, extensions);
} else if (kGL_GrGLStandard == standard) {
- return create_desktop_interface(version, extensions);
- } else {
- return NULL;
+ interface = create_desktop_interface(version, extensions);
+ }
+
+ if (NULL != interface) {
+ interface->fExtensions.swap(&extensions);
}
+
+ return interface;
}
« no previous file with comments | « src/gpu/gl/SkGLContextHelper.cpp ('k') | src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698