[webkit-reviews] review denied: [Bug 103577] TiledDrawingArea should recycle tiles : [Attachment 176606] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 28 17:10:42 PST 2012


Simon Fraser (smfr) <simon.fraser at apple.com> has denied Beth Dakin
<bdakin at apple.com>'s request for review:
Bug 103577: TiledDrawingArea should recycle tiles
https://bugs.webkit.org/show_bug.cgi?id=103577

Attachment 176606: Patch
https://bugs.webkit.org/attachment.cgi?id=176606&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=176606&action=review


> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.h:43
> +class TileLayerPool {

I don't think this should be 'TileLayerPool' because we should use it for
non-tile layers too. Just LayerPool should be fine.

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.h:55
> +    unsigned decayedCapacity() const;

What does 'decayed' mean?

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.h:74
> +    unsigned m_totalBytes;
> +    unsigned m_capacity;

Would be nice to name m_capacity to indicate what units it's in (bytes?)

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.mm:72
> +    IntSize layerSize([layer.get() frame].size);

Would be better to use the bounds size (frame is a synthetic property on
CALayer).

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.mm:76
> +    MutexLocker locker(m_layerPoolMutex);

We don't need locking on desktop. You could #ifdef this PLATFORM(IOS)

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.mm:103
> +    return m_capacity / 4 + m_capacity * 3 / 4 * (1.f - decayProgess);

Don't need 1.f; just 1.

> Source/WebCore/platform/graphics/ca/mac/TileLayerPool.mm:115
> +    dispatch_time_t nextPruneTime = dispatch_time(DISPATCH_TIME_NOW, 1 *
NSEC_PER_SEC);
> +    dispatch_after(nextPruneTime,
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
> +	   prune();
> +    });

Why isn't this just a Timer?


More information about the webkit-reviews mailing list