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

Issue 25082006: [Android WebView] OnMemoryPressure to drop tile memory (Closed)

Created:
7 years, 2 months ago by boliu
Modified:
7 years, 2 months ago
Reviewers:
Ted C, joth, no sievers
CC:
chromium-reviews, android-webview-reviews_chromium.org
Visibility:
Public.

Description

[Android WebView] OnMemoryPressure to drop tile memory In OnMemoryPressure, drop tiles on invisible browser views. Not reusing base::MemoryPressureListener because Android WebView requires onTrimMemory to be called synchronously. BUG= NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226643

Patch Set 1 #

Total comments: 7

Patch Set 2 : per view callback #

Total comments: 1

Patch Set 3 : real working code #

Total comments: 9

Patch Set 4 : unregister #

Total comments: 4

Patch Set 5 : Address comments #

Patch Set 6 : Fix early out on no change #

Patch Set 7 : use level #

Total comments: 2

Patch Set 8 : indent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -18 lines) Patch
M android_webview/browser/browser_view_renderer.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/browser/in_process_view_renderer.h View 1 2 3 4 5 chunks +7 lines, -0 lines 0 comments Download
M android_webview/browser/in_process_view_renderer.cc View 1 2 3 4 5 6 5 chunks +70 lines, -8 lines 0 comments Download
M android_webview/browser/scoped_app_gl_state_restore.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/scoped_app_gl_state_restore.cc View 1 2 3 4 2 chunks +14 lines, -9 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 6 chunks +31 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/android/synchronous_compositor.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/android/synchronous_compositor.cc View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
boliu
7 years, 2 months ago (2013-09-30 16:34:20 UTC) #1
joth
https://codereview.chromium.org/25082006/diff/1/android_webview/browser/gl_view_renderer_manager.cc File android_webview/browser/gl_view_renderer_manager.cc (right): https://codereview.chromium.org/25082006/diff/1/android_webview/browser/gl_view_renderer_manager.cc#newcode14 android_webview/browser/gl_view_renderer_manager.cc:14: memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind( the thread you construct this on is ...
7 years, 2 months ago (2013-10-01 11:10:46 UTC) #2
boliu
Changed to one listener per ViewRenderer. The patch started out as some "only drop tiles ...
7 years, 2 months ago (2013-10-01 19:21:56 UTC) #3
boliu
https://codereview.chromium.org/25082006/diff/8001/android_webview/browser/in_process_view_renderer.cc File android_webview/browser/in_process_view_renderer.cc (right): https://codereview.chromium.org/25082006/diff/8001/android_webview/browser/in_process_view_renderer.cc#newcode335 android_webview/browser/in_process_view_renderer.cc:335: if (eglGetCurrentContext() != last_egl_context_) This check is failing, so ...
7 years, 2 months ago (2013-10-01 20:10:48 UTC) #4
boliu
On 2013/10/01 20:10:48, boliu wrote: > https://codereview.chromium.org/25082006/diff/8001/android_webview/browser/in_process_view_renderer.cc > File android_webview/browser/in_process_view_renderer.cc (right): > > https://codereview.chromium.org/25082006/diff/8001/android_webview/browser/in_process_view_renderer.cc#newcode335 > ...
7 years, 2 months ago (2013-10-01 20:42:00 UTC) #5
joth
On 1 October 2013 21:42, <boliu@chromium.org> wrote: > On 2013/10/01 20:10:48, boliu wrote: > > ...
7 years, 2 months ago (2013-10-02 00:19:22 UTC) #6
boliu
So PS3 "works" as in I verified it actually does something. About observer_list_threadsafe.h, if you ...
7 years, 2 months ago (2013-10-02 02:14:04 UTC) #7
joth
https://codereview.chromium.org/25082006/diff/16001/android_webview/browser/in_process_view_renderer.cc File android_webview/browser/in_process_view_renderer.cc (right): https://codereview.chromium.org/25082006/diff/16001/android_webview/browser/in_process_view_renderer.cc#newcode408 android_webview/browser/in_process_view_renderer.cc:408: TRACE_EVENT0("android_webview", "EarlyOut_ModeProcess"); intended edit? https://codereview.chromium.org/25082006/diff/16001/android_webview/browser/in_process_view_renderer.cc#newcode907 android_webview/browser/in_process_view_renderer.cc:907: void InProcessViewRenderer::ForceCompositeSW() { ...
7 years, 2 months ago (2013-10-02 10:47:01 UTC) #8
boliu
Still haven't made the level change since that needs testing. https://codereview.chromium.org/25082006/diff/16001/android_webview/browser/in_process_view_renderer.cc File android_webview/browser/in_process_view_renderer.cc (right): https://codereview.chromium.org/25082006/diff/16001/android_webview/browser/in_process_view_renderer.cc#newcode408 ...
7 years, 2 months ago (2013-10-02 14:09:54 UTC) #9
boliu
Ready for full review. Took all your suggestions about level plus one more: ignore TRIM_MEMORY_UI_HIDDEN, ...
7 years, 2 months ago (2013-10-02 17:53:51 UTC) #10
joth
lgtm
7 years, 2 months ago (2013-10-02 18:13:56 UTC) #11
boliu
+ted for content/public/browser/android
7 years, 2 months ago (2013-10-02 18:24:32 UTC) #12
Ted C
lgtm - content/public/browser/android https://codereview.chromium.org/25082006/diff/32001/content/public/browser/android/synchronous_compositor.cc File content/public/browser/android/synchronous_compositor.cc (right): https://codereview.chromium.org/25082006/diff/32001/content/public/browser/android/synchronous_compositor.cc#newcode15 content/public/browser/android/synchronous_compositor.cc:15: num_resources_limit == other.num_resources_limit; should only be ...
7 years, 2 months ago (2013-10-02 22:54:39 UTC) #13
boliu
https://codereview.chromium.org/25082006/diff/32001/content/public/browser/android/synchronous_compositor.cc File content/public/browser/android/synchronous_compositor.cc (right): https://codereview.chromium.org/25082006/diff/32001/content/public/browser/android/synchronous_compositor.cc#newcode15 content/public/browser/android/synchronous_compositor.cc:15: num_resources_limit == other.num_resources_limit; On 2013/10/02 22:54:39, Ted C wrote: ...
7 years, 2 months ago (2013-10-02 23:04:42 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/25082006/42001
7 years, 2 months ago (2013-10-03 00:19:40 UTC) #15
commit-bot: I haz the power
7 years, 2 months ago (2013-10-03 01:08:17 UTC) #16
Message was sent while issue was closed.
Change committed as 226643

Powered by Google App Engine
This is Rietveld 408576698