OSDN Git Service

Merge Android R
[android-x86/external-minigbm.git] / gbm_helpers.c
index 13904f6..0626a6d 100644 (file)
@@ -30,6 +30,20 @@ uint64_t gbm_convert_usage(uint32_t usage)
                use_flags |= BO_USE_CAMERA_WRITE;
        if (usage & GBM_BO_USE_CAMERA_READ)
                use_flags |= BO_USE_CAMERA_READ;
+       if (usage & GBM_BO_USE_PROTECTED)
+               use_flags |= BO_USE_PROTECTED;
+       if (usage & GBM_BO_USE_SW_READ_OFTEN)
+               use_flags |= BO_USE_SW_READ_OFTEN;
+       if (usage & GBM_BO_USE_SW_READ_RARELY)
+               use_flags |= BO_USE_SW_READ_RARELY;
+       if (usage & GBM_BO_USE_SW_WRITE_OFTEN)
+               use_flags |= BO_USE_SW_WRITE_OFTEN;
+       if (usage & GBM_BO_USE_SW_WRITE_RARELY)
+               use_flags |= BO_USE_SW_WRITE_RARELY;
+       if (usage & GBM_BO_USE_HW_VIDEO_DECODER)
+               use_flags |= BO_USE_HW_VIDEO_DECODER;
+       if (usage & GBM_BO_USE_HW_VIDEO_ENCODER)
+               use_flags |= BO_USE_HW_VIDEO_ENCODER;
 
        return use_flags;
 }