Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Issue 2484743003: Fix screen flicker when resizing CRD window in split-screen mode (Closed)

Created:
4 years, 1 month ago by joedow
Modified:
4 years, 1 month ago
Reviewers:
Yuwei, Lambros
CC:
chromium-reviews, agrieve+watch_chromium.org, chromoting-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix screen flicker when resizing CRD window in split-screen mode This problem had two sources: 1.) The default background color for Android apps is white, but we use black to clear our canvas. When dragging, this white background is shown when the window is resized past the boundaries of the image we render. When the user stops dragging and the window is resized, white is briefly shown followed by black. The fix here is to use black for our default background color. DEBUG builds will show a flash since the debug color is green, but Release builds will look clean. 2.) When resizing, we received events in a different order than when we first start the Desktop activity. These events could cause a premature reposition of the canvas (due to either screen or image dimensions not being set). If we didn't have both, our calculations would be off and we would render the image incorrectly for one frame before receiving the rest of the info and correctly drawing the image. The differences in these two frames would cause a flash. The fix here is to ensure we have both screen and image dimensions before repositioning the image and requesting the frame to be rendered. BUG=662456 Committed: https://crrev.com/41c6db6d1a394e6e3a12c60ad7a4696045c527bf Cr-Commit-Position: refs/heads/master@{#430378}

Patch Set 1 #

Patch Set 2 : Fixing some comments before the review. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -3 lines) Patch
M remoting/android/java/src/org/chromium/chromoting/Desktop.java View 1 2 chunks +8 lines, -0 lines 2 comments Download
M remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java View 1 chunk +8 lines, -3 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/RenderData.java View 1 chunk +9 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 15 (8 generated)
joedow
PTAL!
4 years, 1 month ago (2016-11-07 18:36:59 UTC) #4
Lambros
lgtm https://codereview.chromium.org/2484743003/diff/20001/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2484743003/diff/20001/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode137 remoting/android/java/src/org/chromium/chromoting/Desktop.java:137: getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK)); Would Color.TRANSPARENT be better?
4 years, 1 month ago (2016-11-07 20:36:25 UTC) #7
joedow
Thanks! https://codereview.chromium.org/2484743003/diff/20001/remoting/android/java/src/org/chromium/chromoting/Desktop.java File remoting/android/java/src/org/chromium/chromoting/Desktop.java (right): https://codereview.chromium.org/2484743003/diff/20001/remoting/android/java/src/org/chromium/chromoting/Desktop.java#newcode137 remoting/android/java/src/org/chromium/chromoting/Desktop.java:137: getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK)); On 2016/11/07 20:36:25, Lambros wrote: > ...
4 years, 1 month ago (2016-11-07 21:12:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2484743003/20001
4 years, 1 month ago (2016-11-07 21:13:24 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-07 21:18:39 UTC) #11
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/41c6db6d1a394e6e3a12c60ad7a4696045c527bf Cr-Commit-Position: refs/heads/master@{#430378}
4 years, 1 month ago (2016-11-07 21:32:56 UTC) #13
Yuwei
4 years, 1 month ago (2016-11-07 21:36:15 UTC) #15
Message was sent while issue was closed.
BTW have you tried changing the glClearColor in GlRenderer to transparent and
directly set the black/green background in Java? If that works then I think it
may get rid of the flickering in debug build.

Powered by Google App Engine
This is Rietveld 408576698