diff --git a/engine/src/flutter/skia/BUILD.gn b/engine/src/flutter/skia/BUILD.gn index d77cb223be..1df2be7045 100644 --- a/engine/src/flutter/skia/BUILD.gn +++ b/engine/src/flutter/skia/BUILD.gn @@ -338,7 +338,7 @@ component("skia") { "//third_party/skia/src/fonts/SkGScalerContext.h", ] - if (is_ios || is_mac || is_android) { + if (is_ios || is_mac || is_android || use_glfw) { sources -= [ "//third_party/skia/src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ] @@ -357,6 +357,10 @@ component("skia") { sources += [ "//third_party/skia/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ] + } else if (use_glfw) { + sources += [ + "//skia/ext/GrGLCreateNativeInterface_glfw.cpp" + ] } set_sources_assignment_filter(sources_assignment_filter) @@ -522,6 +526,10 @@ component("skia") { configs -= [ "//build/config/compiler:optimize" ] configs += [ "//build/config/compiler:optimize_max" ] } + + if (use_glfw) { + deps += [ "//third_party/glfw" ] + } } # Separated out so it can be compiled with different flags for SSE.