Bug 104612 - Enhance the TileCache to cache more tiles
Summary: Enhance the TileCache to cache more tiles
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-12-10 16:38 PST by Simon Fraser (smfr)
Modified: 2012-12-11 16:48 PST (History)
7 users (show)

See Also:


Attachments
Patch (35.98 KB, patch)
2012-12-10 17:03 PST, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-12-10 16:38:41 PST
Enhance the TileCache to cache more tiles
Comment 1 Simon Fraser (smfr) 2012-12-10 17:03:15 PST
Created attachment 178670 [details]
Patch
Comment 2 Simon Fraser (smfr) 2012-12-10 17:05:17 PST
<rdar://problem/10790464>
Comment 3 WebKit Review Bot 2012-12-10 18:09:03 PST
Attachment 178670 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/ChangeLog:12:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:14:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:16:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:19:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:22:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:24:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Source/WebCore/ChangeLog:25:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 7 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2012-12-11 16:08:09 PST
Comment on attachment 178670 [details]
Patch

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

Yikes!

> Source/WebCore/ChangeLog:72
> +        (WebCore::TileCache::TileCache):
> +        (WebCore::TileCache::~TileCache):
> +        (WebCore::TileCache::setNeedsDisplay):
> +        (WebCore::TileCache::setNeedsDisplayInRect):
> +        (WebCore::TileCache::setTileNeedsDisplayInRect):
> +        (WebCore::TileCache::setScale):
> +        (WebCore::TileCache::setAcceleratesDrawing):
> +        (WebCore::TileCache::setTilesOpaque):
> +        (WebCore::TileCache::prepopulateRect):
> +        (WebCore::TileCache::setTileDebugBorderWidth):
> +        (WebCore::TileCache::setTileDebugBorderColor):
> +        (WebCore::TileCache::computeTileCoverageRect):
> +        (WebCore::TileCache::tileSizeForCoverageRect):
> +        (WebCore::TileCache::tileRevalidationTimerFired):
> +        (WebCore::TileCache::blankPixelCount):
> +        (WebCore::queueTileForRemoval):
> +        (WebCore::TileCache::removeAllTiles):
> +        (WebCore::TileCache::removeAllSecondaryTiles):
> +        (WebCore::TileCache::removeTilesInCohort):
> +        (WebCore::TileCache::revalidateTiles):
> +        (WebCore::TileCache::nextTileCohort):
> +        (WebCore::TileCache::startedNewCohort):
> +        (WebCore::TileCache::newestTileCohort):
> +        (WebCore::TileCache::oldestTileCohort):
> +        (WebCore::TileCache::scheduleCohortRemoval):
> +        (WebCore::TileCache::cohortRemovalTimerFired):
> +        (WebCore::TileCache::ensureTilesForRect):
> +        (WebCore::TileCache::tileGridExtent):
> +        (WebCore::TileCache::tileCoverageRect):
> +        (WebCore::TileCache::tileLayerAtIndex):
> +        (WebCore::TileCache::drawTileMapContents):

This saddens the reviewer.

> Source/WebCore/page/FrameView.cpp:1896
> +    fprintf(stderr, "FrameView::requestScrollPositionUpdate to %d,%d\n", position.x(), position.y());

Is this logging supposed to be here? Seems unlikely.
Comment 5 Tim Horton 2012-12-11 16:09:21 PST
Comment on attachment 178670 [details]
Patch

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

> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:410
> +    if (m_tileCoverage & CoverageForHorizontalScrolling && !largeVisibleRectChange)
> +        coverageHorizontalSize *= 2;
> +
> +    if (m_tileCoverage & CoverageForVerticalScrolling && !largeVisibleRectChange)
> +        coverageVerticalSize *= 3;

Could factor out the if (!largeVisibleRectChange).
Comment 6 Tim Horton 2012-12-11 16:10:49 PST
Comment on attachment 178670 [details]
Patch

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

> Source/WebCore/platform/graphics/ca/mac/TileCache.h:138
> +        KeepSecondaryTiles,
> +        PruneSecondaryTiles

Is "Secondary" the word we want to go with here?
Comment 7 Simon Fraser (smfr) 2012-12-11 16:48:59 PST
http://trac.webkit.org/changeset/137387