return asFP<GRALLOC1_PFN_UNLOCK>(unlockHook);
case GRALLOC1_FUNCTION_SET_MODIFIER:
return asFP<GRALLOC1_PFN_SET_MODIFIER>(setModifierHook);
- case GRALLOC1_FUNCTION_SET_INTERLACE:
- return asFP<GRALLOC1_PFN_SET_INTERLACE>(setInterlaceHook);
- case GRALLOC1_FUNCTION_SET_PROTECTIONINFO:
- return asFP<GRALLOC1_PFN_SET_PROTECTIONINFO>(setProtectionInfoHook);
+ case GRALLOC1_FUNCTION_SET_INTERLACE:
+ return asFP<GRALLOC1_PFN_SET_INTERLACE>(setInterlaceHook);
+ case GRALLOC1_FUNCTION_GET_INTERLACE:
+ return asFP<GRALLOC1_PFN_GET_INTERLACE>(getInterlaceHook);
+ case GRALLOC1_FUNCTION_SET_PROTECTIONINFO:
+ return asFP<GRALLOC1_PFN_SET_PROTECTIONINFO>(setProtectionInfoHook);
case GRALLOC1_FUNCTION_INVALID:
ALOGE("Invalid function descriptor");
return nullptr;
int32_t CrosGralloc1::setInterlace(buffer_handle_t buffer, uint32_t interlace)
{
auto hnd = (cros_gralloc_handle*) cros_gralloc_convert_handle(buffer);
- if (!hnd) {
- return CROS_GRALLOC_ERROR_BAD_HANDLE;
- }
- hnd->is_interlaced = interlace;
- return CROS_GRALLOC_ERROR_NONE;
+ if (!hnd) {
+ return CROS_GRALLOC_ERROR_BAD_HANDLE;
+ }
+ return driver->setinterlace(buffer, interlace);
+}
+
+int32_t CrosGralloc1::getInterlace(buffer_handle_t buffer, uint32_t *interlace)
+{
+ auto hnd = (cros_gralloc_handle *)cros_gralloc_convert_handle(buffer);
+ if (!hnd) {
+ return CROS_GRALLOC_ERROR_BAD_HANDLE;
+ }
+ return driver->getinterlace(buffer, interlace);
}
int32_t CrosGralloc1::setProtectionInfo(buffer_handle_t buffer, uint32_t protection_info)