OLD | NEW |
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 #if defined(SK_BUILD_FOR_MAC) | 13 #if defined(SK_BUILD_FOR_MAC) |
14 #include <OpenGL/OpenGL.h> | 14 #include <OpenGL/OpenGL.h> |
15 #elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_NACL) | 15 #elif defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_NACL) |
16 #include <GLES2/gl2.h> | 16 #include <GLES2/gl2.h> |
17 #include <EGL/egl.h> | 17 #include <EGL/egl.h> |
18 #elif defined(SK_BUILD_FOR_UNIX) | 18 #elif defined(SK_BUILD_FOR_UNIX) |
19 #include <X11/Xlib.h> | 19 #include <X11/Xlib.h> |
20 #include <GL/glx.h> | 20 #include <GL/glx.h> |
21 #elif defined(SK_BUILD_FOR_WIN32) | 21 #elif defined(SK_BUILD_FOR_WIN32) |
22 #include <Windows.h> | 22 #include <windows.h> |
23 #include <GL/GL.h> | 23 #include <GL/GL.h> |
24 #endif | 24 #endif |
25 | 25 |
26 class SkNativeGLContext : public SkGLContextHelper { | 26 class SkNativeGLContext : public SkGLContextHelper { |
27 public: | 27 public: |
28 SkNativeGLContext(); | 28 SkNativeGLContext(); |
29 | 29 |
30 virtual ~SkNativeGLContext(); | 30 virtual ~SkNativeGLContext(); |
31 | 31 |
32 virtual void makeCurrent() const SK_OVERRIDE; | 32 virtual void makeCurrent() const SK_OVERRIDE; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 HWND fWindow; | 77 HWND fWindow; |
78 HDC fDeviceContext; | 78 HDC fDeviceContext; |
79 HGLRC fGlRenderContext; | 79 HGLRC fGlRenderContext; |
80 static ATOM gWC; | 80 static ATOM gWC; |
81 #elif defined(SK_BUILD_FOR_IOS) | 81 #elif defined(SK_BUILD_FOR_IOS) |
82 void* fEAGLContext; | 82 void* fEAGLContext; |
83 #endif | 83 #endif |
84 }; | 84 }; |
85 | 85 |
86 #endif | 86 #endif |
OLD | NEW |