bool Hwcomposer::vsyncControl(int disp, int enabled) { RETURN_FALSE_IF_NOT_INIT(); ALOGTRACE("disp = %d, enabled = %d", disp, enabled); 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->vsyncControl(enabled ? true : false); }
bool Hwcomposer::vsyncControl(int disp, int enabled) { log.v("vsyncControl: disp %d, enabled %d", disp, enabled); if (!initCheck()) return false; if (disp < 0 || disp >= IDisplayDevice::DEVICE_COUNT) { log.e("vsyncControl: invalid disp %d", disp); return false; } IDisplayDevice *device = mDisplayDevices.itemAt(disp); if (!device) { log.e("vsyncControl: no device found"); return false; } return device->vsyncControl(enabled); }