diff options
author | 2017-08-17 14:37:06 -0400 | |
---|---|---|
committer | 2017-08-17 18:58:21 +0000 | |
commit | 194db176c9c306c62771d3595d1e61d539fc949f (patch) | |
tree | 4e900ae49f9e0fee5980b043b700a74839d86fd9 /tools/viewer/sk_app/android | |
parent | 1dc8ecbf5fd40ce918dfd958b1eb58b5f640a0d7 (diff) |
Add ANGLE support to Viewer on Windows
Change-Id: I97a844b2f289d2518f60a64f94d60551c4530dd4
Reviewed-on: https://skia-review.googlesource.com/35742
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/viewer/sk_app/android')
-rw-r--r-- | tools/viewer/sk_app/android/GLWindowContext_android.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/viewer/sk_app/android/GLWindowContext_android.cpp b/tools/viewer/sk_app/android/GLWindowContext_android.cpp index 12c12a7218..944865909b 100644 --- a/tools/viewer/sk_app/android/GLWindowContext_android.cpp +++ b/tools/viewer/sk_app/android/GLWindowContext_android.cpp @@ -6,11 +6,11 @@ * found in the LICENSE file. */ -#include <GLES/gl.h> - -#include "WindowContextFactory_android.h" -#include "../GLWindowContext.h" #include <EGL/egl.h> +#include <GLES/gl.h> +#include "../GLWindowContext.h" +#include "WindowContextFactory_android.h" +#include "gl/GrGLInterface.h" using sk_app::GLWindowContext; using sk_app::DisplayParams; @@ -25,7 +25,7 @@ public: void onSwapBuffers() override; - void onInitializeContext() override; + sk_sp<const GrGLInterface> onInitializeContext() override; void onDestroyContext() override; private: @@ -57,7 +57,7 @@ GLWindowContext_android::~GLWindowContext_android() { this->destroyContext(); } -void GLWindowContext_android::onInitializeContext() { +sk_sp<const GrGLInterface> GLWindowContext_android::onInitializeContext() { fWidth = ANativeWindow_getWidth(fNativeWindow); fHeight = ANativeWindow_getHeight(fNativeWindow); @@ -131,6 +131,8 @@ void GLWindowContext_android::onInitializeContext() { eglGetConfigAttrib(fDisplay, surfaceConfig, EGL_STENCIL_SIZE, &fStencilBits); eglGetConfigAttrib(fDisplay, surfaceConfig, EGL_SAMPLES, &fSampleCount); + + return sk_sp<const GrGLInterface>(GrGLCreateNativeInterface()); } void GLWindowContext_android::onDestroyContext() { |