예제 #1
0
bool Hwcomposer::compositionComplete(int disp)
{
    log.v("compositionComplete");

    if (!initCheck())
        return false;

    // complete fb device first
    if (mFBDev) {
        mFBDev->base.compositionComplete(&mFBDev->base);
    }

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

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

    return device->compositionComplete();
}
bool Hwcomposer::compositionComplete(int disp)
{
    RETURN_FALSE_IF_NOT_INIT();

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

    mDisplayContext->compositionComplete();
    if (disp >= (int) mDisplayDevices.size()) {
        return false;
    }

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

    return device->compositionComplete();
}