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

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: disable unittest on android Created 8 years, 3 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 | « chrome/test/data/extensions/manifest_tests/script_badge_basic.json ('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
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index 9657de9a3cb009d43f2e5cca6f9441b8614fd852..a9809b38f3a7dc4847992895b1666f352e00224a 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_ * 255, 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_;
« no previous file with comments | « chrome/test/data/extensions/manifest_tests/script_badge_basic.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698