[DisplayList] Don't call Skia Ganesh methods when its not available. (#162345)

This follows the same pattern followed in [Skia
itself](c59d1f0a27/bench/GpuTools.h (L34)).

The QNX builds don't have either Ganesh or Graphite. This will all go
away in Slimpeller builds too.
This commit is contained in:
Chinmay Garde 2025-01-28 18:09:42 -08:00 committed by GitHub
parent e110019f04
commit 3905156860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -366,11 +366,13 @@ void DlSkCanvasAdapter::DrawShadow(const DlPath& path,
}
void DlSkCanvasAdapter::Flush() {
#if defined(SK_GANESH)
auto dContext = GrAsDirectContext(delegate_->recordingContext());
if (dContext) {
dContext->flushAndSubmit();
}
#endif // defined(SK_GANESH)
}
} // namespace flutter