15 bool fbo_reset_after_present,
16 std::shared_ptr<EmbedderExternalViewEmbedder> external_view_embedder)
17 : gl_dispatch_table_(
std::move(gl_dispatch_table)),
18 fbo_reset_after_present_(fbo_reset_after_present),
19 external_view_embedder_(
std::move(external_view_embedder)) {
35bool EmbedderSurfaceGLSkia::IsValid()
const {
40std::unique_ptr<GLContextResult> EmbedderSurfaceGLSkia::GLContextMakeCurrent() {
41 return std::make_unique<GLContextDefaultResult>(
46bool EmbedderSurfaceGLSkia::GLContextClearCurrent() {
51bool EmbedderSurfaceGLSkia::GLContextPresent(
52 const GLPresentInfo& present_info) {
58GLFBOInfo EmbedderSurfaceGLSkia::GLContextFBO(GLFrameInfo frame_info)
const {
66bool EmbedderSurfaceGLSkia::GLContextFBOResetAfterPresent()
const {
67 return fbo_reset_after_present_;
71DlMatrix EmbedderSurfaceGLSkia::GLContextSurfaceTransformation()
const {
86SurfaceFrame::FramebufferInfo EmbedderSurfaceGLSkia::GLContextFramebufferInfo()
89 auto info = SurfaceFrame::FramebufferInfo{};
90 info.supports_readback =
true;
91 info.supports_partial_repaint =
97std::unique_ptr<Surface> EmbedderSurfaceGLSkia::CreateGPUSurface() {
98 const bool render_to_surface = !external_view_embedder_;
99 return std::make_unique<GPUSurfaceGLSkia>(
106sk_sp<GrDirectContext> EmbedderSurfaceGLSkia::CreateResourceContext()
const {
114 <<
"Internal error: Resource context available but could not create "
115 "a compatible Skia context.";
122 <<
"Could not create a resource context for async texture uploads. "
123 "Expect degraded performance. Set a valid make_resource_current "
124 "callback on FlutterOpenGLRendererConfig.";
~EmbedderSurfaceGLSkia() override
EmbedderSurfaceGLSkia(GLDispatchTable gl_dispatch_table, bool fbo_reset_after_present, std::shared_ptr< EmbedderExternalViewEmbedder > external_view_embedder)
std::function< void *(const char *)> GLProcResolver
virtual sk_sp< const GrGLInterface > GetGLInterface() const
static sk_sp< GrDirectContext > CreateCompatibleResourceLoadingContext(GrBackendApi backend, const sk_sp< const GrGLInterface > &gl_interface)
FlutterDesktopBinaryReply callback
#define FML_LOG(severity)
impeller::Matrix DlMatrix
std::function< bool(void)> gl_clear_current_callback
std::function< GLFBOInfo(intptr_t)> gl_populate_existing_damage
std::function< bool(void)> gl_make_current_callback
std::function< intptr_t(GLFrameInfo)> gl_fbo_callback
std::function< bool(GLPresentInfo)> gl_present_callback
std::function< bool(void)> gl_make_resource_current_callback
std::function< void *(const char *)> gl_proc_resolver
std::function< DlMatrix(void)> gl_surface_transformation_callback