hwc: clean up overlay for external from the draw thread only

Cleanup overlay for external from the draw thread. If done from the uevent
thread, its possible that the object being used by draw thread is deleted by
uevent thread.

This also removes unnecessary side-effects where libexternal sets states in
hwc, whereas, it could be set from hwc itself. There should be no need for
libexternal to modify states in hwc.

Bug: 7335863 (partial fix)
Change-Id: If07483e640abae2ced2418e0d5c8f278f8c6ec33
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Saurabh Shah
2012-10-12 17:00:39 -07:00
committed by Iliyan Malchev
parent f83d4480f2
commit 1a8cda0b2c
5 changed files with 54 additions and 73 deletions

View File

@@ -408,16 +408,6 @@ void ExternalDisplay::setExternalDisplay(int connected)
const char* prop = (connected) ? "1" : "0";
// set system property
property_set("hw.hdmiON", prop);
ALOGD("%s sending hotplug: connected = %d", __FUNCTION__,connected);
//Inform SF. Disabled until SF calls unblank
ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].isActive = false;
ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].connected = connected;
//TODO ideally should be done on "connected" not "online"
ctx->proc->hotplug(ctx->proc, HWC_DISPLAY_EXTERNAL, connected);
if(connected == false)
ctx->priv_proc.onExtDisconnect(ctx->priv_proc);
}
return;
}