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

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

Issue 2050613003: Support resize in Android Viewer App (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: OpenGL 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_android_DEFINED 8 #ifndef GLWindowContext_android_DEFINED
9 #define GLWindowContext_android_DEFINED 9 #define GLWindowContext_android_DEFINED
10 10
11 #include <android/native_window_jni.h>
djsollen 2016/06/09 18:34:21 don't need this here. Just before the namespace l
12
11 #include "../GLWindowContext.h" 13 #include "../GLWindowContext.h"
12 #include "Window_android.h" 14 #include "Window_android.h"
13 15
14 #include <EGL/egl.h> 16 #include <EGL/egl.h>
15 17
16 namespace sk_app { 18 namespace sk_app {
17 19
18 class GLWindowContext_android : public GLWindowContext { 20 class GLWindowContext_android : public GLWindowContext {
19 public: 21 public:
20 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di splayParams&); 22 friend GLWindowContext* GLWindowContext::Create(void* platformData, const Di splayParams&);
21 23
22 ~GLWindowContext_android() override; 24 ~GLWindowContext_android() override;
23 25
24 void onSwapBuffers() override; 26 void onSwapBuffers() override;
25 27
26 void onInitializeContext(void*, const DisplayParams&) override; 28 void onInitializeContext(void*, const DisplayParams&) override;
27 void onDestroyContext() override; 29 void onDestroyContext() override;
28 30
29 private: 31 private:
30 GLWindowContext_android(void*, const DisplayParams&); 32 GLWindowContext_android(void*, const DisplayParams&);
31 33
32 EGLDisplay fDisplay; 34 EGLDisplay fDisplay;
33 EGLContext fEGLContext; 35 EGLContext fEGLContext;
34 EGLSurface fSurface; 36 EGLSurface fSurface;
37
38 // For setDisplayParams and resize which call onInitializeContext with null platformData
39 ANativeWindow* fNativeWindow = nullptr;
35 }; 40 };
36 41
37 42
38 } 43 }
39 44
40 #endif 45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698