flushAndSubmit

Call to ensure all reads/writes of the surface have been issued to the underlying 3D API.

Skia will correctly order its own draws and pixel operations. This must to be used to ensure correct ordering when the surface backing store is accessed outside Skia (e.g. direct use of the 3D API or a windowing system). DirectContext has additional flush and submit methods that apply to all surfaces and images created from a DirectContext.


fun flushAndSubmit(syncCpu: Boolean)

Call to ensure all reads/writes of the surface have been issued to the underlying 3D API.

Skia will correctly order its own draws and pixel operations. This must to be used to ensure correct ordering when the surface backing store is accessed outside Skia (e.g. direct use of the 3D API or a windowing system). DirectContext has additional flush and submit methods that apply to all surfaces and images created from a DirectContext.

Parameters

syncCpu

a flag determining if cpu should be synced