• fmalita's avatar
    Clamp background tiles when possible · a7e84a02
    fmalita authored
    We're currently always drawing tiled backgrounds in repeat/repeat mode,
    even if we need tiling in one dimension only.
    
    This has the unexpected side effect of opposite edge bleed, in the
    dimension which doesn't require tiling, when rasterized for hidpi
    devices (DSF causing Skia to sample across the tile boundary).
    
    Detect cases where tile repetition is not needed, and strength-reduce the
    shader tile mode accordingly.
    
    Also make Image::drawPattern() protected, as it is only used in subclasses.
    
    BUG=673261
    R=reed@google.com,fs@opera.com,schenney@chromium.org
    
    Review-Url: https://codereview.chromium.org/2582383002
    Cr-Commit-Position: refs/heads/master@{#439529}
    a7e84a02
Image.h 8.95 KB