@@ -87,16 +87,26 @@ G_DEFINE_TYPE(FlCompositorOpenGL,
87
87
fl_compositor_opengl,
88
88
fl_compositor_get_type ())
89
89
90
- // Check if running on an NVIDIA driver .
91
- static gboolean is_nvidia () {
90
+ // Check if running on driver supporting blit .
91
+ static gboolean driver_supports_blit () {
92
92
const gchar* vendor = reinterpret_cast <const gchar*>(glGetString (GL_VENDOR));
93
- return strstr (vendor, " NVIDIA" ) != nullptr ;
94
- }
95
93
96
- // Check if running on an Vivante Corporation driver.
97
- static gboolean is_vivante () {
98
- const gchar* vendor = reinterpret_cast <const gchar*>(glGetString (GL_VENDOR));
99
- return strstr (vendor, " Vivante Corporation" ) != nullptr ;
94
+ // Note: List of unsupported vendors due to issue
95
+ // https://github.com/flutter/flutter/issues/152099
96
+ const char * unsupported_vendors_exact[] = {" Vivante Corporation" , " ARM" };
97
+ const char * unsupported_vendors_fuzzy[] = {" NVIDIA" };
98
+
99
+ for (const char * unsupported : unsupported_vendors_fuzzy) {
100
+ if (strstr (vendor, unsupported) != nullptr ) {
101
+ return FALSE ;
102
+ }
103
+ }
104
+ for (const char * unsupported : unsupported_vendors_exact) {
105
+ if (strcmp (vendor, unsupported) == 0 ) {
106
+ return FALSE ;
107
+ }
108
+ }
109
+ return TRUE ;
100
110
}
101
111
102
112
// Returns the log for the given OpenGL shader. Must be freed by the caller.
@@ -445,10 +455,8 @@ static void fl_compositor_opengl_setup(FlCompositor* compositor) {
445
455
446
456
fl_opengl_manager_make_current (self->opengl_manager );
447
457
448
- // Note: NVIDIA and Vivante are temporarily disabled due to
449
- // https://github.com/flutter/flutter/issues/152099
450
458
self->has_gl_framebuffer_blit =
451
- ! is_nvidia () && ! is_vivante () &&
459
+ driver_supports_blit () &&
452
460
(epoxy_gl_version () >= 30 ||
453
461
epoxy_has_gl_extension (" GL_EXT_framebuffer_blit" ));
454
462
0 commit comments