Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
ANGLEWindowContext.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#ifndef ANGLEWindowContext_DEFINED
8#define ANGLEWindowContext_DEFINED
9
10#define EGL_EGL_PROTOTYPES 1
11
12#include <EGL/egl.h>
13#include <EGL/eglext.h>
15
16namespace skwindow::internal {
17
19public:
21 ~ANGLEWindowContext() override;
22
23protected:
24 void onSwapBuffers() override;
25
27 void onDestroyContext() override;
28
29 virtual EGLDisplay onGetEGLDisplay(
30 PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT) const = 0;
31 virtual NativeWindowType onGetNativeWindow() const = 0;
32 virtual SkISize onGetSize() const = 0;
33 virtual int onGetStencilBits() const = 0;
34
35private:
36 EGLDisplay fDisplay = EGL_NO_DISPLAY;
37 EGLContext fEGLContext = EGL_NO_CONTEXT;
38 EGLSurface fEGLSurface = EGL_NO_SURFACE;
39};
40
41} // namespace skwindow::internal
42
43#endif
virtual SkISize onGetSize() const =0
virtual int onGetStencilBits() const =0
virtual EGLDisplay onGetEGLDisplay(PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT) const =0
virtual NativeWindowType onGetNativeWindow() const =0
sk_sp< const GrGLInterface > onInitializeContext() override