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

Issue 1001573003: [Android] Stop hiding the RWHV layer subtree when hiding the widget (Closed)

Created:
5 years, 9 months ago by jdduke (slow)
Modified:
5 years, 7 months ago
Reviewers:
Ted C, piman, boliu, no sievers
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, Changwan Ryu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland "[Android] Preserve the front buffer when the activity is paused" This change was reverted in r322170 due to WebView breakage. The ApplicationStatus dependency has been made optional, allowing WebView to opt-out of its use. It was speculatively reverted again in r327092, but that turned out to be a false alarm. Original description: ---------------------------- Currently, when an activity is stopped, we explicitly hide the foreground Tab. This is problematic, as current hiding semantics might clear the visual front buffer before the window is hidden. This in turn causes an unpleasant flickering during activity transitions, e.g., when backgrounding Chrome or locking the screen. Wire Activity onPause/onResume notifications to WindowAndroidObservers, allowing the foreground tab to preserve its front buffer while hiding its web content. If the tab is explicitly hidden, or the root window is lost, the front buffer will be cleared as usual. BUG=481450, 434401 Committed: https://crrev.com/61c7526b6acb7b29d27da7156bea7ddea71477d7 Cr-Commit-Position: refs/heads/master@{#329283}

Patch Set 1 #

Patch Set 2 : Semi-working build #

Total comments: 5

Patch Set 3 : HideInternal+ShowInternal #

Patch Set 4 : Fix contextual search #

Total comments: 10

Patch Set 5 : Code review #

Total comments: 4

Patch Set 6 : Code review #

Total comments: 2

Patch Set 7 : Java fix #

Patch Set 8 : Take visibility in the constructor #

Patch Set 9 : Rebase #

Total comments: 3

Patch Set 10 : Rebase trace pause/resume #

Patch Set 11 : Fixes for WebView #

Patch Set 12 : Link to the WebView bug #

Patch Set 13 : Rebase #

Patch Set 14 : Reload tab if necessary #

Patch Set 15 : Add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -56 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/Tab.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +49 lines, -0 lines 0 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_evictor.h View 1 2 3 4 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_evictor.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +86 lines, -36 lines 0 comments Download
M content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -9 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +32 lines, -1 line 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +20 lines, -0 lines 0 comments Download
M ui/android/window_android.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M ui/android/window_android.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +13 lines, -0 lines 0 comments Download
M ui/android/window_android_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 91 (27 generated)
jdduke (slow)
This was the simplest solution I could see that avoids any new ambiguous APIs and ...
5 years, 9 months ago (2015-03-11 18:09:30 UTC) #2
no sievers
Ok, but that changes the API so that the embedder now *has* to remove a ...
5 years, 9 months ago (2015-03-11 19:42:01 UTC) #3
jdduke (slow)
On 2015/03/11 19:42:01, sievers wrote: > Ok, but that changes the API so that the ...
5 years, 9 months ago (2015-03-11 19:52:20 UTC) #4
no sievers
On 2015/03/11 19:52:20, jdduke wrote: > On 2015/03/11 19:42:01, sievers wrote: > > Ok, but ...
5 years, 9 months ago (2015-03-11 20:11:12 UTC) #5
jdduke (slow)
I guess I'm struggling to determine responsibilities, as there are 50 ways I could wire ...
5 years, 9 months ago (2015-03-11 20:56:39 UTC) #6
jdduke (slow)
On 2015/03/11 20:56:39, jdduke wrote: > I guess I'm struggling to determine responsibilities, as there ...
5 years, 9 months ago (2015-03-11 20:59:01 UTC) #7
no sievers
On 2015/03/11 20:56:39, jdduke wrote: > I guess I'm struggling to determine responsibilities, as there ...
5 years, 9 months ago (2015-03-11 21:24:40 UTC) #8
David Trainor- moved to gerrit
On 2015/03/11 21:24:40, sievers wrote: > On 2015/03/11 20:56:39, jdduke wrote: > > I guess ...
5 years, 9 months ago (2015-03-11 21:40:25 UTC) #9
jdduke (slow)
On 2015/03/11 21:40:25, David Trainor wrote: > On 2015/03/11 21:24:40, sievers wrote: > > On ...
5 years, 9 months ago (2015-03-11 23:36:16 UTC) #10
jdduke (slow)
I'd like some feedback on the latest patchset. I now route pause/resume/visibility updates from the ...
5 years, 9 months ago (2015-03-16 16:54:12 UTC) #11
no sievers
Would something like this work? RWHVA::OnWindowVisibilityChanged(bool visible) { DCHECK(is_showing_); // or we wouldn't be observing ...
5 years, 9 months ago (2015-03-17 21:37:47 UTC) #12
no sievers
meh, that dropped stuff: ... RWHVA::OnActivityPaused() { DCHECK(is_showing_); // or we wouldn't be observing which ...
5 years, 9 months ago (2015-03-17 21:39:52 UTC) #13
no sievers
and we might be able to put something into content_unittests (there are a bunch of ...
5 years, 9 months ago (2015-03-17 21:41:30 UTC) #14
jdduke (slow)
On 2015/03/17 21:41:30, sievers wrote: > and we might be able to put something into ...
5 years, 9 months ago (2015-03-17 22:11:53 UTC) #15
jdduke (slow)
On 2015/03/17 22:11:53, jdduke wrote: > On 2015/03/17 21:41:30, sievers wrote: > > and we ...
5 years, 9 months ago (2015-03-17 22:13:09 UTC) #16
jdduke (slow)
https://codereview.chromium.org/1001573003/diff/20001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java File ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/20001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java#newcode24 ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java:24: implements ApplicationStatus.ActivityStateListener { On 2015/03/17 21:37:47, sievers wrote: > ...
5 years, 9 months ago (2015-03-17 22:22:18 UTC) #17
no sievers
On 2015/03/17 22:22:18, jdduke wrote: > https://codereview.chromium.org/1001573003/diff/20001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java > File ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java > (right): > > https://codereview.chromium.org/1001573003/diff/20001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java#newcode24 ...
5 years, 9 months ago (2015-03-17 23:54:59 UTC) #18
David Trainor- moved to gerrit
On 2015/03/17 23:54:59, sievers wrote: > On 2015/03/17 22:22:18, jdduke wrote: > > > https://codereview.chromium.org/1001573003/diff/20001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java ...
5 years, 9 months ago (2015-03-18 18:07:51 UTC) #19
jdduke (slow)
OK, what about the latest approach? This aligns with your suggestions sievers@, with a few ...
5 years, 9 months ago (2015-03-18 19:51:42 UTC) #22
jdduke (slow)
https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.h File content/browser/renderer_host/render_widget_host_view_android.h (right): https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.h#newcode196 content/browser/renderer_host/render_widget_host_view_android.h:196: void OnVisibilityChanged(bool visible) override; OnVisibilityChanged is a little generic ...
5 years, 9 months ago (2015-03-18 20:16:51 UTC) #23
no sievers
https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1546 content/browser/renderer_host/render_widget_host_view_android.cc:1546: if (!host_ || host_->is_hidden()) see question below https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1928 content/browser/renderer_host/render_widget_host_view_android.cc:1928: ...
5 years, 9 months ago (2015-03-18 21:04:48 UTC) #24
jdduke (slow)
Ted: Do you anticipate any issues if we stop explicitly calling Tab.hide() on the foreground ...
5 years, 9 months ago (2015-03-18 23:29:14 UTC) #26
Ted C
On 2015/03/18 23:29:14, jdduke wrote: > Ted: Do you anticipate any issues if we stop ...
5 years, 9 months ago (2015-03-18 23:46:32 UTC) #27
no sievers
https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1472 content/browser/renderer_host/render_widget_host_view_android.cc:1472: return; Can we move this early-out to the top? ...
5 years, 9 months ago (2015-03-19 20:21:52 UTC) #28
jdduke (slow)
https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/1001573003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1472 content/browser/renderer_host/render_widget_host_view_android.cc:1472: return; On 2015/03/19 20:21:52, sievers wrote: > Can we ...
5 years, 9 months ago (2015-03-20 14:59:29 UTC) #31
no sievers
+piman for the DelegatedFrameEvictor change. Does that look ok, and if so should we remove ...
5 years, 9 months ago (2015-03-20 18:45:55 UTC) #33
piman
LGTM for DelegatedFrameEvictor.
5 years, 9 months ago (2015-03-20 20:06:25 UTC) #34
no sievers
lgtm w/2nits https://codereview.chromium.org/1001573003/diff/160001/content/browser/renderer_host/delegated_frame_evictor.cc File content/browser/renderer_host/delegated_frame_evictor.cc (right): https://codereview.chromium.org/1001573003/diff/160001/content/browser/renderer_host/delegated_frame_evictor.cc#newcode18 content/browser/renderer_host/delegated_frame_evictor.cc:18: has_frame_ = true; Should this DCHECK_EQ(visible, visible_)? ...
5 years, 9 months ago (2015-03-20 21:48:25 UTC) #35
jdduke (slow)
Thanks for review (and for being patient :). https://codereview.chromium.org/1001573003/diff/160001/content/browser/renderer_host/delegated_frame_evictor.cc File content/browser/renderer_host/delegated_frame_evictor.cc (right): https://codereview.chromium.org/1001573003/diff/160001/content/browser/renderer_host/delegated_frame_evictor.cc#newcode18 content/browser/renderer_host/delegated_frame_evictor.cc:18: has_frame_ ...
5 years, 9 months ago (2015-03-20 22:48:18 UTC) #36
Ted C
lgtm https://codereview.chromium.org/1001573003/diff/180001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java File ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/180001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java#newcode109 ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java:109: if (newState == ActivityState.PAUSED) all on a single ...
5 years, 9 months ago (2015-03-20 23:26:03 UTC) #37
jdduke (slow)
https://codereview.chromium.org/1001573003/diff/180001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java File ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/180001/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java#newcode109 ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java:109: if (newState == ActivityState.PAUSED) On 2015/03/20 23:26:03, Ted C ...
5 years, 9 months ago (2015-03-23 16:16:57 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/190001
5 years, 9 months ago (2015-03-23 16:17:48 UTC) #41
jdduke (slow)
On 2015/03/23 16:17:48, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
5 years, 9 months ago (2015-03-23 18:36:32 UTC) #43
jdduke (slow)
On 2015/03/23 18:36:32, jdduke wrote: > On 2015/03/23 16:17:48, I haz the power (commit-bot) wrote: ...
5 years, 9 months ago (2015-03-23 20:15:02 UTC) #45
no sievers
lgtm
5 years, 9 months ago (2015-03-23 20:19:52 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/250001
5 years, 9 months ago (2015-03-23 20:51:37 UTC) #49
no sievers
+Bo to double-check that this doesn't do something unexpected for WebView.
5 years, 9 months ago (2015-03-23 22:04:03 UTC) #51
jdduke (slow)
https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java File ui/android/java/src/org/chromium/ui/base/WindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java#newcode242 ui/android/java/src/org/chromium/ui/base/WindowAndroid.java:242: protected void onActivityPaused() { I believe WebView hides/shows the ...
5 years, 9 months ago (2015-03-23 22:14:42 UTC) #53
no sievers
On 2015/03/23 22:14:42, jdduke wrote: > https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java > File ui/android/java/src/org/chromium/ui/base/WindowAndroid.java (right): > > https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java#newcode242 > ...
5 years, 9 months ago (2015-03-23 22:45:19 UTC) #54
boliu
https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java File ui/android/java/src/org/chromium/ui/base/WindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java#newcode242 ui/android/java/src/org/chromium/ui/base/WindowAndroid.java:242: protected void onActivityPaused() { On 2015/03/23 22:14:42, jdduke wrote: ...
5 years, 9 months ago (2015-03-23 23:14:15 UTC) #55
boliu
https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java File ui/android/java/src/org/chromium/ui/base/WindowAndroid.java (right): https://codereview.chromium.org/1001573003/diff/250001/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java#newcode242 ui/android/java/src/org/chromium/ui/base/WindowAndroid.java:242: protected void onActivityPaused() { On 2015/03/23 23:14:15, boliu wrote: ...
5 years, 9 months ago (2015-03-23 23:18:54 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/270001
5 years, 9 months ago (2015-03-24 19:00:40 UTC) #59
commit-bot: I haz the power
Committed patchset #10 (id:270001)
5 years, 9 months ago (2015-03-24 19:54:25 UTC) #60
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/764f31d287a4995f0c89915745f5749e1c7063af Cr-Commit-Position: refs/heads/master@{#322052}
5 years, 9 months ago (2015-03-24 19:55:31 UTC) #61
Torne
This broke WebView on ToT (which doesn't have a current activity, and probably doesn't set ...
5 years, 9 months ago (2015-03-25 12:56:53 UTC) #63
boliu
The issue is probably not because the activity is null (otherwise webview wouldn't create ActivityWindowAndroid). ...
5 years, 9 months ago (2015-03-25 14:35:58 UTC) #64
boliu
A revert of this CL (patchset #10 id:270001) has been created in https://codereview.chromium.org/1038573004/ by boliu@chromium.org. ...
5 years, 9 months ago (2015-03-25 14:41:14 UTC) #65
Ted C
On 2015/03/25 14:41:14, boliu wrote: > A revert of this CL (patchset #10 id:270001) has ...
5 years, 9 months ago (2015-03-25 15:36:48 UTC) #66
jdduke (slow)
Per offline discussion, I've updated ActivityWindowAndroid to make activity state listening optional. boliu@: could you ...
5 years, 9 months ago (2015-03-25 17:23:05 UTC) #68
no sievers
lgtm
5 years, 9 months ago (2015-03-25 17:27:14 UTC) #69
boliu
android_webview lgtm Actually ran webview this time and make sure it doesn't crash anymore..
5 years, 9 months ago (2015-03-25 17:30:11 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/330001
5 years, 9 months ago (2015-03-25 17:32:18 UTC) #73
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/47257)
5 years, 9 months ago (2015-03-25 19:27:46 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/330001
5 years, 9 months ago (2015-03-25 19:43:10 UTC) #77
commit-bot: I haz the power
Committed patchset #12 (id:330001)
5 years, 9 months ago (2015-03-25 20:15:09 UTC) #78
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/7954daf991a2adda234dc2e886b2d1ddf0049221 Cr-Commit-Position: refs/heads/master@{#322228}
5 years, 9 months ago (2015-03-25 20:16:12 UTC) #79
jdduke (slow)
A revert of this CL (patchset #12 id:330001) has been created in https://codereview.chromium.org/1109863003/ by jdduke@chromium.org. ...
5 years, 7 months ago (2015-04-27 17:35:38 UTC) #80
jdduke (slow)
Ted, any thoughts on the changes in patchset #13 to Tab.java? That change resolves the ...
5 years, 7 months ago (2015-05-11 20:51:05 UTC) #83
jdduke (slow)
On 2015/05/11 20:51:05, jdduke wrote: > Ted, any thoughts on the changes in patchset #13 ...
5 years, 7 months ago (2015-05-11 20:51:22 UTC) #84
Ted C
On 2015/05/11 20:51:22, jdduke wrote: > On 2015/05/11 20:51:05, jdduke wrote: > > Ted, any ...
5 years, 7 months ago (2015-05-11 20:59:26 UTC) #85
jdduke (slow)
On 2015/05/11 20:59:26, Ted C wrote: > On 2015/05/11 20:51:22, jdduke wrote: > > On ...
5 years, 7 months ago (2015-05-11 22:28:56 UTC) #86
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1001573003/410001
5 years, 7 months ago (2015-05-11 22:31:27 UTC) #89
commit-bot: I haz the power
Committed patchset #15 (id:410001)
5 years, 7 months ago (2015-05-11 23:54:39 UTC) #90
commit-bot: I haz the power
5 years, 7 months ago (2015-05-11 23:56:13 UTC) #91
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/61c7526b6acb7b29d27da7156bea7ddea71477d7
Cr-Commit-Position: refs/heads/master@{#329283}

Powered by Google App Engine
This is Rietveld 408576698