Commit fd31940e authored by ananta's avatar ananta Committed by Commit bot

The ScaleImageSkiaRep function which attempts to scale the image to the...

The ScaleImageSkiaRep function which attempts to scale the image to the desired scale should not do anything if the image is already scaled to the required scale.

The FindRepresentation function in ImageSkiaStorage has support for returning images scaled to the desired scale.

This fixes an annoying DCHECK firing on Windows boxes with display scales like 125%, 150%, etc.

BUG=NONE

Review URL: https://codereview.chromium.org/657203002

Cr-Commit-Position: refs/heads/master@{#299825}
parent 96ba1a63
......@@ -56,8 +56,7 @@ class Matcher {
};
ImageSkiaRep ScaleImageSkiaRep(const ImageSkiaRep& rep, float target_scale) {
DCHECK_NE(rep.scale(), target_scale);
if (rep.is_null())
if (rep.is_null() || rep.scale() == target_scale)
return rep;
gfx::Size scaled_size = ToCeiledSize(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment