Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Remoting Android] Fix Painting After Rotation Bug
Previous CL 2132883002 removed the attachRedrawCallback() call in Desktop.onStart() since it will be called in DesktopView.surfaceChanged(). This introduces a bug that if requestRepaint() is called before surfaceChanged(), then mRepaintPending will be set to true and mDisplay.redrawGraphics() will do nothing. paint() will not be called since the redraw callback is not set, and mRepaintPending will not be set back to false, making it skip all future render requests until paint() is triggered by JniVideoRenderer in C++. This CL fixes this problem by moving attachRedrawCallback() to the ctor of DesktopView. paint() already has checks to prevent rendering happens if the DesktopView is not ready yet. BUG=627191 Review-Url: https://codereview.chromium.org/2136233002 Cr-Commit-Position: refs/heads/master@{#404732}
- Loading branch information