• v.paturi's avatar
    Add support for classification of image sprites in dark mode. · ef9ee16f
    v.paturi authored
    To generate the bitmap for sprite images the location of the
    images cannot be assumed to be (0,0) which is the current
    scenario. Instead the source rectangle of the image should be
    used for getting the correct bitmap of the image.
    
    In the case of image sprites, a single image object has to
    hold the classifications of all the images that it contains.
    Having a single DarkModeClassification object will wrongly
    give the classification of the first image that is classified
    to all the images of the sprite.
    
    So instead use the location of source rect of the image as a
    key for a map which stores the classifications.
    
    Bug: None
    Change-Id: I52487bb511bd5ed9c847cb381e537610f7a420f6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1514437Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
    Reviewed-by: default avatarPrashant Nevase <prashant.n@samsung.com>
    Commit-Queue: Prashant Nevase <prashant.n@samsung.com>
    Cr-Commit-Position: refs/heads/master@{#641702}
    ef9ee16f
image.cc 15.3 KB