If you get this error:
../../src/core/SkBitmapDevice.cpp:83: fatal error: ""valid_for_bitmap_device(bitmap.info(), nullptr)""
aborted (core dumped)
It might happen because kN32_SkColorType=kBGRA_8888_SkColorType
in your code
and kN32_SkColorType=kRGBA_8888_SkColorType
on Skia side (in valid_for_bitmap_device()
).
On Linux, you need to define -DSK_SAMPLES_FOR_X
when you compile your own program,
this will makekN32_SkColorType=kRGBA_8888_SkColorType
.