Changeset 87822 in webkit


Ignore:
Timestamp:
Jun 1, 2011 10:36:56 AM (13 years ago)
Author:
enne@google.com
Message:

2011-05-19 Adrienne Walker <enne@google.com>

Reviewed by James Robinson.

[chromium] Don't split long, narrow layers into multiple tiles.
https://bugs.webkit.org/show_bug.cgi?id=60821

These tests have imperceptible pixel changes on horizontal scrollbars
as a result of this patch. Marking them as failing temporarily so
that they can be rebaselined.

  • platform/chromium/test_expectations.txt:

2011-05-19 Adrienne Walker <enne@google.com>

Reviewed by James Robinson.

[chromium] Don't split long, narrow layers into multiple tiles.
https://bugs.webkit.org/show_bug.cgi?id=60821

This changes the heuristic for when we tile layers to be less bad
about wasting texture space. Long, narrow layers that are tiled with
a large tile size waste texture space. Now layers are only tiled if
they are above 512px in one dimension and extend into a second tile in
the other. If they are not tiled, their layer texture will exactly
fit their layer bounds. In particular, this will help scrollbars.

  • platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::updateLayerSize):
  • platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::maxTextureSize):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87817 r87822  
     12011-05-19  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Don't split long, narrow layers into multiple tiles.
     6        https://bugs.webkit.org/show_bug.cgi?id=60821
     7
     8        These tests have imperceptible pixel changes on horizontal scrollbars
     9        as a result of this patch.  Marking them as failing temporarily so
     10        that they can be rebaselined.
     11
     12        * platform/chromium/test_expectations.txt:
     13
    1142011-06-01  Steve Lacey  <sjl@chromium.org>
    215
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r87817 r87822  
    39043904BUGCR82950 WIN : http/tests/navigation/post-303-response.html = TEXT
    39053905
     3906BUGENNE GPU : compositing/geometry/fixed-position.html = FAIL
     3907BUGENNE GPU : compositing/geometry/vertical-scroll-composited.html = FAIL
     3908BUGENNE GPU : compositing/overflow/fixed-position-ancestor-clip.html = FAIL
     3909
    39063910// Fails after details element turned on in Chrome r85744
    39073911// See also BUGWK59172
  • trunk/Source/WebCore/ChangeLog

    r87821 r87822  
     12011-05-19  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Don't split long, narrow layers into multiple tiles.
     6        https://bugs.webkit.org/show_bug.cgi?id=60821
     7
     8        This changes the heuristic for when we tile layers to be less bad
     9        about wasting texture space.  Long, narrow layers that are tiled with
     10        a large tile size waste texture space.  Now layers are only tiled if
     11        they are above 512px in one dimension and extend into a second tile in
     12        the other.  If they are not tiled, their layer texture will exactly
     13        fit their layer bounds.  In particular, this will help scrollbars.
     14
     15        * platform/graphics/chromium/ContentLayerChromium.cpp:
     16        (WebCore::ContentLayerChromium::updateLayerSize):
     17        * platform/graphics/chromium/LayerRendererChromium.h:
     18        (WebCore::LayerRendererChromium::maxTextureSize):
     19
    1202011-06-01  Cary Clark  <caryclark@google.com>
    221
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp

    r87167 r87822  
    4747#include <wtf/CurrentTime.h>
    4848
    49 // Maximum size the width or height of this layer can be before enabling tiling
    50 // when m_tilingOption == AutoTile.
     49// Start tiling when the width and height of a layer are larger than this size.
    5150static int maxUntiledSize = 512;
     51
    5252// When tiling is enabled, use tiles of this dimension squared.
    5353static int defaultTileSize = 256;
     
    187187
    188188    const IntSize tileSize(min(defaultTileSize, layerSize.width()), min(defaultTileSize, layerSize.height()));
    189     const bool autoTiled = layerSize.width() > maxUntiledSize || layerSize.height() > maxUntiledSize;
     189
     190    // Tile if both dimensions large, or any one dimension large and the other
     191    // extends into a second tile. This heuristic allows for long skinny layers
     192    // (e.g. scrollbars) that are Nx1 tiles to minimize wasted texture space.
     193    const bool anyDimensionLarge = layerSize.width() > maxUntiledSize || layerSize.height() > maxUntiledSize;
     194    const bool anyDimensionOneTile = layerSize.width() <= defaultTileSize || layerSize.height() <= defaultTileSize;
     195    const bool autoTiled = anyDimensionLarge && !anyDimensionOneTile;
    190196
    191197    bool isTiled;
     
    197203        isTiled = autoTiled;
    198204
    199     m_tiler->setTileSize(isTiled ? tileSize : layerSize);
     205    IntSize requestedSize = isTiled ? tileSize : layerSize;
     206    const int maxSize = layerRenderer()->maxTextureSize();
     207    IntSize clampedSize = requestedSize.shrunkTo(IntSize(maxSize, maxSize));
     208    m_tiler->setTileSize(clampedSize);
    200209}
    201210
  • trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h

    r87762 r87822  
    122122
    123123    bool checkTextureSize(const IntSize&);
     124    int maxTextureSize() const { return m_maxTextureSize; }
    124125
    125126    const GeometryBinding* sharedGeometry() const { return m_sharedGeometry.get(); }
Note: See TracChangeset for help on using the changeset viewer.