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:
committed by
Iliyan Malchev
parent
f83d4480f2
commit
1a8cda0b2c
@@ -48,13 +48,6 @@ static void openFramebufferDevice(hwc_context_t *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
static void onExtDisconnect(const hwc_context_t::Callbacks& priv_proc) {
|
||||
hwc_context_t *ctx = priv_proc.ctx;
|
||||
overlay::Overlay& ov = *(ctx->mOverlay[HWC_DISPLAY_EXTERNAL]);
|
||||
// Set overlay state
|
||||
ov.setState(ovutils::OV_CLOSED);
|
||||
}
|
||||
|
||||
void initContext(hwc_context_t *ctx)
|
||||
{
|
||||
openFramebufferDevice(ctx);
|
||||
@@ -73,9 +66,6 @@ void initContext(hwc_context_t *ctx)
|
||||
pthread_cond_init(&(ctx->vstate.cond), NULL);
|
||||
ctx->vstate.enable = false;
|
||||
|
||||
ctx->priv_proc.onExtDisconnect = onExtDisconnect;
|
||||
ctx->priv_proc.ctx = ctx;
|
||||
|
||||
ALOGI("Initializing Qualcomm Hardware Composer");
|
||||
ALOGI("MDP version: %d", ctx->mMDP.version);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user