Chromium Code Reviews| 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..36ad950f8288614ce279121b8a3c7ed9a54d6033 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), |
|
pkotwicz
2012/08/29 22:07:43
Can't you use ImageSkiaRep::GetWidth() and ImageSk
tbarzic
2012/08/29 22:18:13
Won't that return rep's size in dip? I need actual
pkotwicz
2012/08/29 23:14:47
Sorry. My bad. You can use ImageSkiaRep::pixel_wid
tbarzic
2012/08/29 23:25:56
yeah, now I feel silly for not noticing those two
|
| - static_cast<int>(image_.size().height() * scale)); |
| + static_cast<int>(image_rep.sk_bitmap().width()), |
| + static_cast<int>(image_rep.sk_bitmap().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_; |