bool Hwcomposer::getDisplayAttributes(int disp,
                                         uint32_t config,
                                         const uint32_t *attributes,
                                         int32_t *values)
{
    RETURN_FALSE_IF_NOT_INIT();

    if (disp < 0 || disp >= IDisplayDevice::DEVICE_COUNT) {
        ELOGTRACE("invalid disp %d", disp);
        return false;
    }
    if (disp >= (int) mDisplayDevices.size()) {
        return false;
    }
    IDisplayDevice *device = mDisplayDevices.itemAt(disp);
    if (!device) {
        ELOGTRACE("no device found");
        return false;
    }

    return device->getDisplayAttributes(config, attributes, values);
}
예제 #2
0
bool Hwcomposer::getDisplayAttributes(int disp,
                                         uint32_t config,
                                         const uint32_t *attributes,
                                         int32_t *values)
{
    log.v("getDisplayAttributes");

    if (!initCheck())
        return false;

    if (disp < 0 || disp >= IDisplayDevice::DEVICE_COUNT) {
        log.e("getDisplayAttributes: invalid disp %d", disp);
        return false;
    }

    IDisplayDevice *device = mDisplayDevices.itemAt(disp);
    if (!device) {
        log.e("getDisplayAttributes: no device found");
        return false;
    }

    return device->getDisplayAttributes(config, attributes, values);
}