OSDN Git Service

Use drm gem acess userdata IOCTL for set/get interlace
[android-x86/external-minigbm.git] / cros_gralloc / gralloc1 / cros_gralloc1_module.h
index 70e5176..cd222ec 100644 (file)
@@ -98,8 +98,9 @@ class CrosGralloc1 : public gralloc1_device_t
                              uint32_t height);
 
        int32_t setFormat(gralloc1_buffer_descriptor_t descriptorId, int32_t format);
-        int32_t setInterlace(buffer_handle_t buffer, uint32_t interlace);
-        int32_t setProtectionInfo(buffer_handle_t buffer, uint32_t protection_info);
+       int32_t setInterlace(buffer_handle_t buffer, uint32_t interlace);
+       int32_t getInterlace(buffer_handle_t buffer, uint32_t *interlace);
+       int32_t setProtectionInfo(buffer_handle_t buffer, uint32_t protection_info);
 
        int32_t createDescriptor(gralloc1_buffer_descriptor_t *outDescriptor);
        static int32_t createDescriptorHook(gralloc1_device_t *device,
@@ -135,15 +136,21 @@ class CrosGralloc1 : public gralloc1_device_t
                return getAdapter(device)->setFormat(descriptorId, format);
        }
 
-        static int32_t setInterlaceHook(gralloc1_device_t *device,
-                                     buffer_handle_t buffer, uint32_t interlace)
-        {
-                return getAdapter(device)->setInterlace(buffer, interlace);
-        }
+       static int32_t setInterlaceHook(gralloc1_device_t *device, buffer_handle_t buffer,
+                                       uint32_t interlace)
+       {
+               return getAdapter(device)->setInterlace(buffer, interlace);
+       }
 
-        static int32_t setProtectionInfoHook(gralloc1_device_t *device,
-                                     buffer_handle_t buffer, uint32_t protection_info)
-        {
+       static int32_t getInterlaceHook(gralloc1_device_t *device, buffer_handle_t buffer,
+                                       uint32_t *interlace)
+       {
+               return getAdapter(device)->getInterlace(buffer, interlace);
+       }
+
+       static int32_t setProtectionInfoHook(gralloc1_device_t *device, buffer_handle_t buffer,
+                                            uint32_t protection_info)
+       {
                 return getAdapter(device)->setProtectionInfo(buffer, protection_info);
         }