Fix emulator

Emulator has no HWC.

Change-Id: I7810b27034f6772823142e5bf877681db1c8ee49
This commit is contained in:
Andy McFadden 2012-09-12 13:14:51 -07:00
parent 43601a2dc3
commit babba18687

View File

@ -111,9 +111,10 @@ HWComposer::HWComposer(
loadFbHalModule(); loadFbHalModule();
loadHwcModule(); loadHwcModule();
if (!hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1) && !mFbDev) { // If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory.
if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1))
&& !mFbDev) {
ALOGE("ERROR: failed to open framebuffer, aborting"); ALOGE("ERROR: failed to open framebuffer, aborting");
// FB mandatory on <= 1.0, give up
abort(); abort();
} }
@ -186,7 +187,9 @@ HWComposer::HWComposer(
} }
HWComposer::~HWComposer() { HWComposer::~HWComposer() {
if (mHwc) {
mHwc->eventControl(mHwc, 0, EVENT_VSYNC, 0); mHwc->eventControl(mHwc, 0, EVENT_VSYNC, 0);
}
if (mVSyncThread != NULL) { if (mVSyncThread != NULL) {
mVSyncThread->requestExitAndWait(); mVSyncThread->requestExitAndWait();
} }