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

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

Issue 10905005: Change browser/page action default icon defined in manifest to support hidpi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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
Index: ui/gfx/image/image_skia_operations.cc
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index c47b89b14d764b7d5c58783c69ff98ac66d1c7ec..d66bd4bbbd1c52c211400792618373c4517b32ad 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -131,15 +131,14 @@ class TransparentImageSource : public gfx::ImageSkiaSource {
virtual ImageSkiaRep GetImageForScale(ui::ScaleFactor scale_factor) OVERRIDE {
ImageSkiaRep image_rep = image_.GetRepresentation(scale_factor);
SkBitmap alpha;
- const float scale = ui::GetScaleFactorScale(image_rep.scale_factor());
alpha.setConfig(SkBitmap::kARGB_8888_Config,
- static_cast<int>(image_.size().width() * scale),
- static_cast<int>(image_.size().height() * scale));
+ image_rep.pixel_width(),
+ image_rep.pixel_height());
alpha.allocPixels();
alpha.eraseColor(SkColorSetARGB(alpha_ * 256, 0, 0, 0));
- return ImageSkiaRep(SkBitmapOperations::CreateMaskedBitmap(
- image_rep.sk_bitmap(), alpha),
- image_rep.scale_factor());
+ return ImageSkiaRep(
+ SkBitmapOperations::CreateMaskedBitmap(image_rep.sk_bitmap(), alpha),
+ image_rep.scale_factor());
}
ImageSkia image_;

Powered by Google App Engine
This is Rietveld 408576698