5#ifndef FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_EGL_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_EGL_SURFACE_H_
10#include <KHR/khrplatform.h>
13#include "flutter/fml/macros.h"
14#include "flutter/fml/time/time_point.h"
15#include "flutter/shell/platform/android/android_environment_gl.h"
27class AndroidEGLSurfaceDamage;
96 bool SwapBuffers(
const std::optional<SkIRect>& surface_damage);
105 bool IsContextCurrent()
const;
107 const EGLSurface surface_;
108 const EGLDisplay display_;
109 const EGLContext context_;
110 std::unique_ptr<AndroidEGLSurfaceDamage> damage_;
111 PFNEGLPRESENTATIONTIMEANDROIDPROC presentation_time_proc_ =
nullptr;
std::optional< SkIRect > InitialDamage()
This is the minimal area that needs to be repainted to get correct result.
bool SwapBuffers(const std::optional< SkIRect > &surface_damage)
This only applies to on-screen surfaces such as those created by AndroidContextGL::CreateOnscreenSurf...
void SetDamageRegion(const std::optional< SkIRect > &buffer_damage)
Sets the damage region for current surface. Corresponds to.
bool SupportsPartialRepaint() const
AndroidEGLSurface(EGLSurface surface, EGLDisplay display, EGLContext context)
bool SetPresentationTime(const fml::TimePoint &presentation_time)
Sets the presentation time for the current surface. This.
AndroidEGLSurfaceMakeCurrentStatus MakeCurrent() const
Binds the EGLContext context to the current rendering thread and to the draw and read surface.
AndroidEGLSurfaceMakeCurrentStatus
Result of calling MakeCurrent on AndroidEGLSurface.
@ kFailure
Failed to make the egl context for the surface current.
@ kSuccessMadeCurrent
Success, the egl context for the surface made current.
@ kSuccessAlreadyCurrent
Success, the egl context for the surface was already current.