WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
106061
[wk2] Remove offscreen tiles from the layer tree
https://bugs.webkit.org/show_bug.cgi?id=106061
Summary
[wk2] Remove offscreen tiles from the layer tree
Tim Horton
Reported
2013-01-03 15:55:40 PST
We should remove TileCache tiles from the layer tree when they're not visible so that the OS can manage their memory as it wishes. The exact semantics haven't been worked out yet, but I have a preliminary patch. <
rdar://problem/12761821
>
Attachments
possibly a patch
(28.32 KB, patch)
2013-01-04 06:32 PST
,
Tim Horton
simon.fraser
: review-
buildbot
: commit-queue-
Details
Formatted Diff
Diff
better patch
(28.08 KB, patch)
2013-01-04 12:27 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
simpler patch, always unparent (remove the setting)
(24.94 KB, patch)
2013-01-04 15:07 PST
,
Tim Horton
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2013-01-04 06:32:01 PST
Created
attachment 181297
[details]
possibly a patch
Build Bot
Comment 2
2013-01-04 07:11:45 PST
Comment on
attachment 181297
[details]
possibly a patch
Attachment 181297
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15677183
New failing tests: compositing/tiling/tiled-layer-resize.html compositing/tiling/rotated-tiled-preserve3d-clamped.html fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html fast/sub-pixel/sub-pixel-accumulates-to-layers.html compositing/tiling/rotated-tiled-clamped.html fast/sub-pixel/transformed-iframe-copy-on-scroll.html
Simon Fraser (smfr)
Comment 3
2013-01-04 10:24:09 PST
Comment on
attachment 181297
[details]
possibly a patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181297&action=review
> Source/WebCore/page/Settings.cpp:189 > + , m_aggressiveTileRetentionEnabled(false)
Why isn't m_unparentOffscreenTilesEnabled initialized?
> Source/WebCore/platform/graphics/TiledBacking.h:78 > + virtual void setAggressiveTileRetentionEnabled(bool) = 0; > + virtual bool aggressiveTileRetentionEnabled() const = 0; > + > + virtual void setUnparentOffscreenTilesEnabled(bool) = 0; > + virtual bool unparentOffscreenTilesEnabled() const = 0; > +
These sound like setting plumbing. I think they would read better as setAggressivelyRetainsTiles() setUnparentsOffscreenTiles() etc.
> Source/WebCore/platform/graphics/ca/mac/TileCache.h:143 > + RemoveTilesFromLayerTree = 1 << 2
I see no downside to always unparenting non TCR tiles. Maybe we should just always do this?
> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:320 > + if (m_isInWindow) { > + scheduleTileRevalidation(0); > + } else { > const double tileRevalidationTimeout = 4; > scheduleTileRevalidation(tileRevalidationTimeout); > }
This would be better as: scheduleTileRevalidation(m_isInWindow ? 0 : tileRevalidationTimeout);
> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:452 > + if (!m_unparentOffscreenTilesEnabled || m_isInWindow) > + revalidationPolicyFlags = CreatePrimaryTiles | PruneSecondaryTiles; > + else > + revalidationPolicyFlags = PruneSecondaryTiles | RemoveTilesFromLayerTree;
This gets simpler if we always remove tiles. CreatePrimaryTiles is only to avoid making primary tiles in background tabs, right?
Tim Horton
Comment 4
2013-01-04 12:27:49 PST
Created
attachment 181357
[details]
better patch I'm going to look at the test failures now.
Tim Horton
Comment 5
2013-01-04 12:56:32 PST
(In reply to
comment #2
)
> (From update of
attachment 181297
[details]
) >
Attachment 181297
[details]
did not pass mac-ews (mac): > Output:
http://queues.webkit.org/results/15677183
> > New failing tests: > compositing/tiling/tiled-layer-resize.html > compositing/tiling/rotated-tiled-preserve3d-clamped.html > fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html > fast/sub-pixel/sub-pixel-accumulates-to-layers.html > compositing/tiling/rotated-tiled-clamped.html > fast/sub-pixel/transformed-iframe-copy-on-scroll.html
Three I can't reproduce (compositing/tiling), three are "missing expected result" :\ (fast/sub-pixel).
Simon Fraser (smfr)
Comment 6
2013-01-04 14:29:10 PST
Comment on
attachment 181357
[details]
better patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181357&action=review
> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:594 > + if (m_unparentsOffscreenTiles)
Why isn't this checking for the RemoveTilesFromLayerTree flag?
> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:653 > + if (validationPolicy & RemoveTilesFromLayerTree) {
The confusion between m_unparentsOffscreenTiles and RemoveTilesFromLayerTree is great!
Tim Horton
Comment 7
2013-01-04 15:07:42 PST
Created
attachment 181386
[details]
simpler patch, always unparent (remove the setting)
Tim Horton
Comment 8
2013-01-04 15:17:55 PST
Thanks, Simon!
http://trac.webkit.org/changeset/138858
Alexey Proskuryakov
Comment 9
2013-01-07 09:52:14 PST
This caused
bug 106205
.
Tim Horton
Comment 10
2013-02-04 14:54:06 PST
This also caused
https://bugs.webkit.org/show_bug.cgi?id=108864
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug