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

Side by Side Diff: tools/viewer/sk_app/android/GLWindowContext_android.h

Issue 2032623002: Implement OpenGL backend in Android viewer app (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Comments Created 4 years, 6 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2016 Google Inc. 3 * Copyright 2016 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 GLWindowContext_unix_DEFINED 8 #ifndef GLWindowContext_android_DEFINED
9 #define GLWindowContext_unix_DEFINED 9 #define GLWindowContext_android_DEFINED
10 10
11 #include "../GLWindowContext.h" 11 #include "../GLWindowContext.h"
12 #include "Window_unix.h" 12 #include "Window_android.h"
13
14 #include <EGL/egl.h>
13 15
14 namespace sk_app { 16 namespace sk_app {
15 17
16 class GLWindowContext_unix : public GLWindowContext { 18 class GLWindowContext_android : public GLWindowContext {
17 public: 19 public:
18 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di splayParams&); 20 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di splayParams&);
19 21
20 ~GLWindowContext_unix() override; 22 ~GLWindowContext_android() override;
21 23
22 void onSwapBuffers() override; 24 void onSwapBuffers() override;
23 25
24 void onInitializeContext(void*, const DisplayParams&) override; 26 void onInitializeContext(void*, const DisplayParams&) override;
25 void onDestroyContext() override; 27 void onDestroyContext() override;
26 28
27 private: 29 private:
28 GLWindowContext_unix(void*, const DisplayParams&); 30 GLWindowContext_android(void*, const DisplayParams&);
29 31
30 Display* fDisplay; 32 EGLDisplay fDisplay;
31 XWindow fWindow; 33 EGLContext fEGLContext;
32 XVisualInfo* fVisualInfo; 34 EGLSurface fSurface;
33 GLXContext fGLContext;
34 }; 35 };
35 36
36 37
37 } 38 }
38 39
39 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698