Skip to content

Commit 46602a0

Browse files
committed
fix: reduce black screen flickering after screen size change
1 parent 62033a8 commit 46602a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/cpp/lorie/InitOutput.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ static Bool lorieRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
530530
DamageRegister(&newPixmap->drawable, pvfb->damage);
531531

532532
if (oldPixmap) {
533+
GCPtr gc = GetScratchGC(newPixmap->drawable.depth, pScreen);
534+
if (gc) {
535+
ValidateGC(&newPixmap->drawable, gc);
536+
gc->ops->CopyArea(&oldPixmap->drawable, &newPixmap->drawable, gc, 0, 0, min(oldPixmap->drawable.width, newPixmap->drawable.width), min(oldPixmap->drawable.height, newPixmap->drawable.height), 0, 0);
537+
FreeScratchGC(gc);
538+
}
533539
TraverseTree(pScreen->root, lorieSetPixmapVisitWindow, oldPixmap);
534540
pScreen->DestroyPixmap(oldPixmap);
535541
}

0 commit comments

Comments
 (0)