summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/themes')
-rw-r--r--chrome/browser/themes/browser_theme_pack.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index bf3f74a..d1b843c 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -1009,8 +1009,11 @@ void BrowserThemePack::GenerateTabBackgroundImages(ImageCache* bitmaps) const {
int vertical_offset = bitmaps->count(prs_id)
? kRestoredTabVerticalOffset : 0;
gfx::Canvas canvas(gfx::Size(bg_tint.width(), bg_tint.height()),
- image_rep_to_tint.scale_factor(),
false);
+ SkScalar image_rep_to_tint_scale =
+ SkFloatToScalar(image_rep_to_tint.GetScale());
+ canvas.sk_canvas()->scale(image_rep_to_tint_scale,
+ image_rep_to_tint_scale);
canvas.TileImageInt(bg_tint, 0, vertical_offset, 0, 0,
bg_tint_dip_size.width(), bg_tint_dip_size.height());
@@ -1021,7 +1024,9 @@ void BrowserThemePack::GenerateTabBackgroundImages(ImageCache* bitmaps) const {
canvas.TileImageInt(*overlay, 0, 0, bg_tint_dip_size.width(),
overlay->height());
}
- tinted_image.AddRepresentation(canvas.ExtractImageRep());
+ SkBitmap bg_tab = canvas.ExtractBitmap();
+ tinted_image.AddRepresentation(gfx::ImageSkiaRep(bg_tab,
+ image_rep_to_tint.scale_factor()));
}
temp_output[prs_id] = new gfx::Image(tinted_image);