OLD | NEW |
| (Empty) |
1 | |
2 /* | |
3 * Copyright 2016 Google Inc. | |
4 * | |
5 * Use of this source code is governed by a BSD-style license that can be | |
6 * found in the LICENSE file. | |
7 */ | |
8 #ifndef GLWindowContext_android_DEFINED | |
9 #define GLWindowContext_android_DEFINED | |
10 | |
11 #include "../GLWindowContext.h" | |
12 #include "Window_android.h" | |
13 | |
14 #include <EGL/egl.h> | |
15 | |
16 struct ANativeWindow; | |
17 | |
18 namespace sk_app { | |
19 | |
20 class GLWindowContext_android : public GLWindowContext { | |
21 public: | |
22 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di
splayParams&); | |
23 | |
24 ~GLWindowContext_android() override; | |
25 | |
26 void onSwapBuffers() override; | |
27 | |
28 void onInitializeContext(void*, const DisplayParams&) override; | |
29 void onDestroyContext() override; | |
30 | |
31 private: | |
32 GLWindowContext_android(void*, const DisplayParams&); | |
33 | |
34 EGLDisplay fDisplay; | |
35 EGLContext fEGLContext; | |
36 EGLSurface fSurface; | |
37 | |
38 // For setDisplayParams and resize which call onInitializeContext with null
platformData | |
39 ANativeWindow* fNativeWindow = nullptr; | |
40 }; | |
41 | |
42 | |
43 } | |
44 | |
45 #endif | |
OLD | NEW |