Skip to content

Instantly share code, notes, and snippets.

@dacap
Last active March 30, 2016 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacap/26d0c29199e9af109d35bd641273df3e to your computer and use it in GitHub Desktop.
Save dacap/26d0c29199e9af109d35bd641273df3e to your computer and use it in GitHub Desktop.
Skia assert failed on SkBitmapDevice.cpp Raw

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment