Skip to content

Instantly share code, notes, and snippets.

@nazgee
Created January 4, 2016 22:41
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 nazgee/945a7e766ffc611c532e to your computer and use it in GitHub Desktop.
Save nazgee/945a7e766ffc611c532e to your computer and use it in GitHub Desktop.
switch (format) {
// 32bpp
case GBM_FORMAT_ARGB8888:
case GBM_FORMAT_XRGB8888:
break;
default:
// unsupported...
goto error;
}
switch (format) {
/* --- 8< --- 8< --- removed some code --- 8< --- 8< --- */
case GBM_FORMAT_XRGB8888:
case GBM_BO_FORMAT_XRGB8888:
dri_format = __DRI_IMAGE_FORMAT_XRGB8888;
break;
/* --- 8< --- 8< --- removed some code --- 8< --- 8< --- */
case GBM_FORMAT_ARGB8888:
case GBM_BO_FORMAT_ARGB8888:
dri_format = __DRI_IMAGE_FORMAT_ARGB8888;
break;
/* --- 8< --- 8< --- removed some code --- 8< --- 8< --- */
default:
errno = EINVAL;
goto failed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment