Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Unified Diff: ui/gfx/image/image_skia.cc

Issue 657203002: The ScaleImageSkiaRep function which attempts to scale the image to the desired scale should not do… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia.cc
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc
index bba6c47641f9f08da231f5fb28f97022a6ca6ad2..b6d9d8d1b63f634d6f93b5f75ed7bebf13708514 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698