|
|
Created:
4 years, 4 months ago by no sievers Modified:
4 years, 4 months ago Reviewers:
jbauman CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, James Su Base URL:
https://chromium.googlesource.com/chromium/src.git@tn1 Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAndroid: Don't hold frame lock during readback
The problem with this is that it might keep the browser-side
tiles from ever getting freed if for some reason the copy output
request does not finish. And currently there are no such
guarantees for example if the app goes to the background and we don't
have a context and cannot composite.
Also, it would cause jank since the lock keeps from submitting new
frames from the renderer.
As far as readback requests are concerned, this would not cause
the readback to be dropped even if we destroyed the Surface since
it's garbage-collected and there should still be a GC root through
the parent Surface and the hidden layer we attach until the readback
is completed.
Remove more of this logic and public API in a follow-up.
BUG=636628
Committed: https://crrev.com/9df27b364447148d91e8afe8589ab0914fbb3688
Cr-Commit-Position: refs/heads/master@{#411523}
Patch Set 1 #
Depends on Patchset: Messages
Total messages: 18 (11 generated)
Description was changed from ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 ========== to ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 ==========
sievers@chromium.org changed reviewers: + jbauman@chromium.org
jbauman@, ptal. Is it correct what I say in the description about Surface/copy_request lifetime (also see patch dependency)?
The CQ bit was checked by sievers@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/08/11 21:57:39, sievers wrote: > jbauman@, ptal. Is it correct what I say in the description about > Surface/copy_request lifetime (also see patch dependency)? lgtm, I think you're right that having a layer referencing it should keep it alive. I guess this is the last use of the frame lock?
On 2016/08/11 22:48:36, jbauman wrote: > On 2016/08/11 21:57:39, sievers wrote: > > jbauman@, ptal. Is it correct what I say in the description about > > Surface/copy_request lifetime (also see patch dependency)? > > lgtm, I think you're right that having a layer referencing it should keep it > alive. I guess this is the last use of the frame lock? Yes, I'm going to remove it as a follow-up. In particular from the public content api. We added it as a mechanism to allow the app to do a readback and compress the UI resource down and make sure the tiles are still there until we have a static replacement layer. But we never acquired the lock correctly, and now it just scares me with the multiple call sites that exist now for layer eviction and don't even respect the lock (and imagine refcounting bugs). And then I rather come up with a better way to keep the layer in place until we have a placeholder where the logic is more internal to the content layer / RWHVA.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by sievers@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
This CL has an open dependency (Issue 2243663002 Patch 1). Please resolve the dependency and try again. If you are sure that there is no real dependency, please use one of the options listed in https://goo.gl/9Es4OR to land the CL.
The CQ bit was checked by sievers@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 ========== to ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 ========== to ========== Android: Don't hold frame lock during readback The problem with this is that it might keep the browser-side tiles from ever getting freed if for some reason the copy output request does not finish. And currently there are no such guarantees for example if the app goes to the background and we don't have a context and cannot composite. Also, it would cause jank since the lock keeps from submitting new frames from the renderer. As far as readback requests are concerned, this would not cause the readback to be dropped even if we destroyed the Surface since it's garbage-collected and there should still be a GC root through the parent Surface and the hidden layer we attach until the readback is completed. Remove more of this logic and public API in a follow-up. BUG=636628 Committed: https://crrev.com/9df27b364447148d91e8afe8589ab0914fbb3688 Cr-Commit-Position: refs/heads/master@{#411523} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/9df27b364447148d91e8afe8589ab0914fbb3688 Cr-Commit-Position: refs/heads/master@{#411523} |