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

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

Issue 11232049: Revert 162636 - Use LANCZOS3 resize algorithm to generate missing image reps for extension action i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « ui/gfx/image/image_skia_operations.h ('k') | 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_operations.cc
===================================================================
--- ui/gfx/image/image_skia_operations.cc (revision 163346)
+++ ui/gfx/image/image_skia_operations.cc (working copy)
@@ -320,17 +320,14 @@
// gfx::ImageSkiaSource overrides:
virtual ImageSkiaRep GetImageForScale(ui::ScaleFactor scale_factor) OVERRIDE {
+ const ImageSkiaRep& image_rep = source_.GetRepresentation(scale_factor);
+ if (image_rep.GetWidth() == target_dip_size_.width() &&
+ image_rep.GetHeight() == target_dip_size_.height())
+ return image_rep;
+
const float scale = ui::GetScaleFactorScale(scale_factor);
const Size target_pixel_size = gfx::ToFlooredSize(
target_dip_size_.Scale(scale));
-
- const ImageSkiaRep& image_rep = source_.GetRepresentation(scale_factor);
-
- if (image_rep.pixel_width() == target_pixel_size.width() &&
- image_rep.pixel_height() == target_pixel_size.height()) {
- return ImageSkiaRep(image_rep.sk_bitmap(), scale_factor);
- }
-
const SkBitmap resized = skia::ImageOperations::Resize(
image_rep.sk_bitmap(),
resize_method_,
@@ -452,14 +449,6 @@
}
// static
-ImageSkia ImageSkiaOperations::CreateImageWithCustomResizeMethod(
- const ImageSkia& source,
- skia::ImageOperations::ResizeMethod method) {
- return ImageSkia(new ResizeSource(source, method, source.size()),
- source.size());
-}
-
-// static
ImageSkia ImageSkiaOperations::CreateImageWithDropShadow(
const ImageSkia& source,
const ShadowValues& shadows) {
« no previous file with comments | « ui/gfx/image/image_skia_operations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698