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

Side by Side Diff: include/gpu/gl/SkNativeGLContext.h

Issue 422323003: Cleanup of context initialization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: request compatability profile Created 6 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
« no previous file with comments | « no previous file | src/gpu/gl/unix/SkNativeGLContext_unix.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #ifndef SkNativeGLContext_DEFINED 8 #ifndef SkNativeGLContext_DEFINED
9 #define SkNativeGLContext_DEFINED 9 #define SkNativeGLContext_DEFINED
10 10
11 #include "SkGLContextHelper.h" 11 #include "SkGLContextHelper.h"
12 12
13 /* This struct is taken from a mesa demo. Please update as required */
14 static const struct { int major, minor; } gl_versions[] = {
15 {1, 0},
16 {1, 1},
17 {1, 2},
18 {1, 3},
19 {1, 4},
20 {1, 5},
21 {2, 0},
22 {2, 1},
23 {3, 0},
24 {3, 1},
25 {3, 2},
26 {3, 3},
27 {4, 0},
28 {4, 1},
29 {4, 2},
30 {4, 3},
31 {4, 4},
32 {0, 0} /* end of list */
33 };
34 #define NUM_GL_VERSIONS SK_ARRAY_COUNT(gl_versions)
35
13 #if defined(SK_BUILD_FOR_MAC) 36 #if defined(SK_BUILD_FOR_MAC)
14 #include <OpenGL/OpenGL.h> 37 #include <OpenGL/OpenGL.h>
15 #elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_NACL) 38 #elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_NACL)
16 #include <GLES2/gl2.h> 39 #include <GLES2/gl2.h>
17 #include <EGL/egl.h> 40 #include <EGL/egl.h>
18 #elif defined(SK_BUILD_FOR_UNIX) 41 #elif defined(SK_BUILD_FOR_UNIX)
19 #include <X11/Xlib.h> 42 #include <X11/Xlib.h>
20 #include <GL/glx.h> 43 #include <GL/glx.h>
21 #elif defined(SK_BUILD_FOR_WIN32) 44 #elif defined(SK_BUILD_FOR_WIN32)
22 #include <windows.h> 45 #include <windows.h>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 HDC fDeviceContext; 102 HDC fDeviceContext;
80 HGLRC fGlRenderContext; 103 HGLRC fGlRenderContext;
81 static ATOM gWC; 104 static ATOM gWC;
82 SkWGLPbufferContext* fPbufferContext; 105 SkWGLPbufferContext* fPbufferContext;
83 #elif defined(SK_BUILD_FOR_IOS) 106 #elif defined(SK_BUILD_FOR_IOS)
84 void* fEAGLContext; 107 void* fEAGLContext;
85 #endif 108 #endif
86 }; 109 };
87 110
88 #endif 111 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/unix/SkNativeGLContext_unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698