Bug 133471 - Prepopulated tiles may never be unparented from TileGrids with aggressive tile retention on
Summary: Prepopulated tiles may never be unparented from TileGrids with aggressive til...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-03 02:30 PDT by Tim Horton
Modified: 2014-06-03 12:01 PDT (History)
2 users (show)

See Also:


Attachments
patch (7.55 KB, patch)
2014-06-03 03:29 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-06-03 02:30:58 PDT
We only unparent tiles that are in the VisibleTileCohort when cleaning up no-longer-visible tiles. If tiles were created via prepopulateRect() and never made it into the VisibleTileCohort, they won't be unparented (and will thus stick around, nonvolatile, forever, until the scale changes or the primary coverage rect moves to intersect them). This is in some cases a huge waste of memory and time.

We can't just immediately unparent all non-primary-coverage layers, because that would defeat prepopulateRect(). We may be able to make use of the cohort age and unparent them on a subsequent revalidateTiles (and schedule a revalidation timer when we prepopulate, etc.).
Comment 1 Tim Horton 2014-06-03 03:29:02 PDT
Created attachment 232419 [details]
patch
Comment 2 WebKit Commit Bot 2014-06-03 03:30:50 PDT
Attachment 232419 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/ca/mac/TileGrid.h:125:  The parameter name "cohortInfo" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2014-06-03 09:03:44 PDT
Comment on attachment 232419 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232419&action=review

> Source/WebCore/platform/graphics/ca/mac/TileController.h:128
> +
> +

Blank lines.

> Source/WebCore/platform/graphics/ca/mac/TileGrid.h:125
> +    double timeUntilCohortExpires(TileCohortInfo cohortInfo); // move onto cohortinfo?

const TileCohortInfo&. Could be static or moved onto TileCohortInfo.
Comment 4 Tim Horton 2014-06-03 12:01:18 PDT
> > Source/WebCore/platform/graphics/ca/mac/TileGrid.h:125
> > +    double timeUntilCohortExpires(TileCohortInfo cohortInfo); // move onto cohortinfo?
> 
> const TileCohortInfo&. Could be static or moved onto TileCohortInfo.

I totally meant to actually do what that comment said, and forgot. Fixed in the patch that landed. Thanks!

http://trac.webkit.org/changeset/169565