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

Issue 1975273003: aw: Avoid livelock bouncing between zero and non-zero memory (Closed)

Created:
4 years, 7 months ago by boliu
Modified:
4 years, 7 months ago
Reviewers:
hush (inactive)
CC:
chromium-reviews, android-webview-reviews_chromium.org, Tobias Sargeant
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

aw: Avoid livelock bouncing between zero and non-zero memory The assumption that compositor will produce a new frame immediately after assigned memory is wrong. Which means resetting memory back to 0 if compositor does not produce a frame can cause a livelock. See bug for a specific case where this actually happens. Easy fix is just stop setting memory back to 0 at end of draw in this case. This is safe because |hardware_enabled_| is only an internal state of BrowserViewRenderer, and ReleaseHardware still guarantees memory set back to 0 even if |hardware_enabled_| is false before the call. Remove the getter to ensure nothing else can use |hardware_enabled_|. Also revert unsetting |hardware_enabled_|, basically reverting the original fix. This is no longer needed since RTM does not use this condition to check whether it should clean up content on GL on render thread. BUG=611729 Committed: https://crrev.com/7a7e615adc82dad9642eacf1002f681cd5fb584b Cr-Commit-Position: refs/heads/master@{#393730}

Patch Set 1 #

Total comments: 1

Patch Set 2 : revert fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -5 lines) Patch
M android_webview/browser/browser_view_renderer.h View 1 chunk +0 lines, -1 line 0 comments Download
M android_webview/browser/browser_view_renderer.cc View 1 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
boliu
ptal long term we should make memory policy depend on some other condition, but this ...
4 years, 7 months ago (2016-05-13 23:15:25 UTC) #2
hush (inactive)
lgtm % nit https://codereview.chromium.org/1975273003/diff/1/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/1975273003/diff/1/android_webview/browser/browser_view_renderer.cc#newcode247 android_webview/browser/browser_view_renderer.cc:247: hardware_enabled_ = compositor_frame_consumer_->HasFrameOnUI(); just return compositor_frame_consumer_->HasFrameOnUI(); ...
4 years, 7 months ago (2016-05-14 00:33:14 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1975273003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1975273003/20001
4 years, 7 months ago (2016-05-14 00:40:32 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-14 02:06:06 UTC) #9
commit-bot: I haz the power
4 years, 7 months ago (2016-05-14 02:07:25 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7a7e615adc82dad9642eacf1002f681cd5fb584b
Cr-Commit-Position: refs/heads/master@{#393730}

Powered by Google App Engine
This is Rietveld 408576698