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

Issue 23478004: UI resource are evicted when LTH is set to not visible. (Closed)

Created:
7 years, 3 months ago by powei
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

This change provides logic for evicting UI resources when the LTH is set to not visible (which happens when tab is backgrounded). The resources are recovered when LTH is set to visible. Closed. Replaced with https://chromiumcodereview.appspot.com/23548022/ BUG=279438, 276680

Patch Set 1 #

Total comments: 3

Patch Set 2 : CanDraw returns false when UI resources are evicted #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -27 lines) Patch
M cc/trees/layer_tree_host.h View 1 chunk +1 line, -3 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 3 chunks +16 lines, -18 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 6 chunks +33 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 1 chunk +38 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 1 chunk +133 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
powei
PTAL. Thanks. Also, I checked the android side. Looks like LTH::SetVisible(false) is never called, so ...
7 years, 3 months ago (2013-08-26 23:35:38 UTC) #1
ccameron
This lg. It looks to me that LTHI::CanDraw() will still return true with the UI ...
7 years, 3 months ago (2013-08-26 23:54:32 UTC) #2
danakj
https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host.cc#newcode438 cc/trees/layer_tree_host.cc:438: bool resource_lost = true; On 2013/08/26 23:54:32, ccameron1 wrote: ...
7 years, 3 months ago (2013-08-27 00:30:02 UTC) #3
powei
On 2013/08/26 23:54:32, ccameron1 wrote: > This lg. It looks to me that LTHI::CanDraw() will ...
7 years, 3 months ago (2013-08-27 01:29:09 UTC) #4
ccameron
7 years, 3 months ago (2013-08-27 22:27:37 UTC) #5
On 2013/08/27 01:29:09, powei wrote:
> On 2013/08/26 23:54:32, ccameron1 wrote:
> > This lg. It looks to me that LTHI::CanDraw() will still return true with the
> UI
> > resources having been deleted. Can you make it so that CanDraw() returns
false
> > after UI resource eviction, until the UI resources all come back in?
> > 
> > https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host.cc
> > File cc/trees/layer_tree_host.cc (right):
> > 
> >
>
https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host.cc#n...
> > cc/trees/layer_tree_host.cc:438: bool resource_lost = true;
> > I haven't seen this way for naming a parameter before -- someone closer to
cc/
> > should comment on if this is okay. Might want to use an enum.
> > 
> >
>
https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host_impl.cc
> > File cc/trees/layer_tree_host_impl.cc (right):
> > 
> >
>
https://codereview.chromium.org/23478004/diff/1/cc/trees/layer_tree_host_impl...
> > cc/trees/layer_tree_host_impl.cc:270: 
> > You probably need to make sure that this returns false after the UI
resources
> > have been evicted.
> 
> Added return false to CanDraw.  Please check my logic to make sure I'm not
> making a bad assumption.  Thanks.

I think there's still an issue with this ... we had to do something similar for
resource eviction, and it was very subtle.

Maybe we should sit down together on this (but first I'm going to have to study
this a bit).

Powered by Google App Engine
This is Rietveld 408576698