| Index: chrome/browser/ui/views/tabs/tab_strip.cc
|
| diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| index 17e15793ff10b3acbafc4a805cc8cd61cd7502e8..40b59354bcac3c9f3e86e3230f0e3d93b409c0fb 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| @@ -393,7 +393,8 @@ void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) {
|
| #endif
|
|
|
| void NewTabButton::OnPaint(gfx::Canvas* canvas) {
|
| - gfx::ImageSkia image = GetImageForScale(canvas->scale_factor());
|
| + gfx::ImageSkia image =
|
| + GetImageForScale(ui::GetScaleFactorFromScale(canvas->scale()));
|
| canvas->DrawImageInt(image, 0, height() - image.height());
|
| }
|
|
|
| @@ -443,12 +444,12 @@ gfx::ImageSkia NewTabButton::GetBackgroundImage(
|
| GetThemeProvider()->GetImageSkiaNamed(IDR_NEWTAB_BUTTON_MASK);
|
| int height = mask->height();
|
| int width = mask->width();
|
| -
|
| + float scale = ui::GetScaleFactorScale(scale_factor);
|
| // The canvas and mask has to use the same scale factor.
|
| - if (!mask->HasRepresentation(scale_factor))
|
| + if (!mask->HasRepresentation(scale))
|
| scale_factor = ui::SCALE_FACTOR_100P;
|
|
|
| - gfx::Canvas canvas(gfx::Size(width, height), scale_factor, false);
|
| + gfx::Canvas canvas(gfx::Size(width, height), scale, false);
|
|
|
| // For custom images the background starts at the top of the tab strip.
|
| // Otherwise the background starts at the top of the frame.
|
| @@ -494,7 +495,9 @@ gfx::ImageSkia NewTabButton::GetImageForState(
|
| gfx::ImageSkia* overlay = GetThemeProvider()->GetImageSkiaNamed(overlay_id);
|
|
|
| gfx::Canvas canvas(
|
| - gfx::Size(overlay->width(), overlay->height()), scale_factor, false);
|
| + gfx::Size(overlay->width(), overlay->height()),
|
| + ui::GetScaleFactorScale(scale_factor),
|
| + false);
|
| canvas.DrawImageInt(GetBackgroundImage(state, scale_factor), 0, 0);
|
|
|
| // Draw the button border with a slight alpha.
|
|
|