71491dc14c
Previously, we took out resize because Vulkan didn't support it in Android. Now Android nyc-dev builds >= 2937079 and nyc-release builds >= NRD66 supports it so we add it back. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050613003 Review-Url: https://codereview.chromium.org/2050613003
46 lines
997 B
C++
46 lines
997 B
C++
|
|
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef GLWindowContext_android_DEFINED
|
|
#define GLWindowContext_android_DEFINED
|
|
|
|
#include "../GLWindowContext.h"
|
|
#include "Window_android.h"
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
struct ANativeWindow;
|
|
|
|
namespace sk_app {
|
|
|
|
class GLWindowContext_android : public GLWindowContext {
|
|
public:
|
|
friend GLWindowContext* GLWindowContext::Create(void* platformData, const DisplayParams&);
|
|
|
|
~GLWindowContext_android() override;
|
|
|
|
void onSwapBuffers() override;
|
|
|
|
void onInitializeContext(void*, const DisplayParams&) override;
|
|
void onDestroyContext() override;
|
|
|
|
private:
|
|
GLWindowContext_android(void*, const DisplayParams&);
|
|
|
|
EGLDisplay fDisplay;
|
|
EGLContext fEGLContext;
|
|
EGLSurface fSurface;
|
|
|
|
// For setDisplayParams and resize which call onInitializeContext with null platformData
|
|
ANativeWindow* fNativeWindow = nullptr;
|
|
};
|
|
|
|
|
|
}
|
|
|
|
#endif
|