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

Issue 2417213002: [Android WebView] Call AwGLFunctor.onDetachedFromWindow with correct order. (Closed)

Created:
4 years, 2 months ago by Shouqun1
Modified:
3 years, 8 months ago
Reviewers:
Tobias Sargeant
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android WebView] Call AwGLFunctor.onDetachedFromWindow with correct order. HardwareRenderer should destoryed before BrowserViewRenderer's onDetachedFromWindow, which makes sure resources returned by parent compositor are released immediately after detach. BUG=655434 TEST=

Patch Set 1 : [Android WebView] Call AwGLFunctor.onDetachedFromWindow with correct order. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 12 (6 generated)
Shouqun1
PTAL
4 years, 2 months ago (2016-10-14 13:33:22 UTC) #5
boliu
I'm gonna let toby take this one. Without out this, it just means we are ...
4 years, 2 months ago (2016-10-14 17:30:42 UTC) #7
Shouqun1
On 2016/10/14 17:30:42, boliu wrote: > I'm gonna let toby take this one. > > ...
4 years, 2 months ago (2016-10-17 03:06:18 UTC) #9
boliu
On 2016/10/17 03:06:18, Shouqun1 wrote: > On 2016/10/14 17:30:42, boliu wrote: > > I'm gonna ...
4 years, 2 months ago (2016-10-18 04:08:40 UTC) #10
Tobias Sargeant
On 2016/10/18 04:08:40, boliu wrote: > On 2016/10/17 03:06:18, Shouqun1 wrote: > > On 2016/10/14 ...
4 years, 2 months ago (2016-10-19 18:47:29 UTC) #11
boliu
4 years, 2 months ago (2016-10-20 20:15:33 UTC) #12
On 2016/10/19 18:47:29, Tobias Sargeant wrote:
> On 2016/10/18 04:08:40, boliu wrote:
> > On 2016/10/17 03:06:18, Shouqun1 wrote:
> > > On 2016/10/14 17:30:42, boliu wrote:
> > > > I'm gonna let toby take this one.
> > > > 
> > > > Without out this, it just means we are holding onto one frame of
resources
> > > even
> > > > after detached. Isn't the end of the world, as long as that those
> resources
> > > are
> > > > eventually get returned.
> > > 
> > > Yes, but since the WebView is detached, the next frame of BVR (accordingly
> > > BVR.ReturnResourceFromParent) will be processed util next attach.
> > > 
> > > If AwGLFunctor.onDetachedFromWindow is called after
> BVR.OnDetachedFromWindow,
> > > the resources will be hold util next WebView attach or destroy, since BVR
> > can't
> > > get a chance to execute ReturnResourceFromParent until next attach.
> > > 
> > > For applications with the following logic: (create WebView -> detach
WebView
> > ->
> > > <do sth for a while> -> attach WebView again), the resources will be hold
> > during
> > > <do sth> stage, in which case,  the memory footprint is increased
> accordingly.
> >  
> > > 
> > > IMO, the ideal case is that when the WebView is in detached state, the
> > resources
> > > are recycled.
> > 
> > All true. I'm just saying this issue is not that severe, since memory won't
> grow
> > unboundedly. An alternative solution is to always directly return resources,
> and
> > never hold returned resources in RenderThreadManager. Anyway I'll let toby
> > decide where this one goes.
> 
> The only concern I can see with changing the order is that if we detach the
> WebView and return child_frame_ before any frame is drawn, then it seems that
> DeleteHardwareRendererOnUI will have the wrong value for hardware_initialized
> (HasFrameOnUI will return false, even though the functor is attached).

please work with shouqun to resolve that then

Powered by Google App Engine
This is Rietveld 408576698