Skip to content

Fix white window after entering PIP when pausing #3973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

uiryuu
Copy link
Member

@uiryuu uiryuu commented Oct 7, 2022

We need to redraw a frame after entering PIP when pausing, and previously we perform such redraw in the next layout. However, it now takes two layouts before finishing entering PIP. This was tested on macOS 13 beta and macOS 12.6.

Changing the pending flag into a counter and redrawing twice solve the problem.

We need to redraw a frame after entering PIP when pausing, and
previously we perform such redraw in the next `layout`. However,
it now takes two `layout`s before finishing entering PIP. This was
tested on macOS 13 beta and macOS 12.6.

Changing the pending flag into a counter and redrawing twice
solve the problem.
@low-batt
Copy link
Contributor

low-batt commented Oct 7, 2022

I pulled the PR and tested. I don't usually use PIP, so I'm unfamiliar with this feature.

The bad behavior I encountered was that with playback paused exiting PIP would sometimes leave me with a fully black window.

This is running on my MacBookPro18,2 under macOS 12.6 and built with Xcode 14.0.

@uiryuu
Copy link
Member Author

uiryuu commented Oct 8, 2022

The bad behavior I encountered was that with playback paused exiting PIP would sometimes leave me with a fully black window.

Did you test on dev branch? This pr doesn't change behavior when exit, so the behavior should be the same.

This is running on my MacBookPro18,2 under macOS 12.6 and built with Xcode 14.0.

I tested on macOS 13 beta and 12.6 virtual machine, didn't reproduce.

@low-batt
Copy link
Contributor

low-batt commented Oct 8, 2022

I did this to test the PR:

git fetch origin pull/3973/head:pr3973
git checkout pr3973

In MainWindowController I see this:

      videoView.pendingRedrawAfterEnteringPIPCount = 2

I think I have the PR sources.

I tried reproducing the black screen on develop and it didn't reproduce for me.

It doesn't do it every time. I pause the video and then go in and out of PIP until I'm left with a black screen. For the following screen recording it happened on the first try:

https://0x0.st/oy5J.mov

@lhc70000 lhc70000 merged commit 7f0c90c into develop Oct 8, 2022
@lhc70000 lhc70000 deleted the fix-pip-white-screen branch October 8, 2022 04:13
CarterLi pushed a commit to CarterLi/iina that referenced this pull request Oct 10, 2022
* Fix white window after entering PIP when pausing

We need to redraw a frame after entering PIP when pausing, and
previously we perform such redraw in the next `layout`. However,
it now takes two `layout`s before finishing entering PIP. This was
tested on macOS 13 beta and macOS 12.6.

Changing the pending flag into a counter and redrawing twice
solve the problem.

* Change variable name upon review
@uiryuu uiryuu mentioned this pull request Mar 23, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants