• Dana Fried's avatar
    Improve handling of Skia images by gfx::Image · 1986f3a9
    Dana Fried authored
    Removed unnecessary indirection and allocation via std::unique_ptr for
    storage of value types in cached image data (both gfx::Size and
    gfx::ImageSkia are value types).
    
    Added unit tests checking assumptions and ensuring that we will not
    break said assumptions about how image data is cached/image data
    duplication is prevented in the future.
    
    Change-Id: I59a70aa1ccb2e00fbc1a69ad92e48374643b6d20
    Reviewed-on: https://chromium-review.googlesource.com/c/1471514Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Commit-Queue: Dana Fried <dfried@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#632315}
    1986f3a9
image.cc 19 KB