summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
authoracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 20:55:08 +0000
committeracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 20:55:08 +0000
commit57047da61489644b8b3604dffd915a1ebcf78f91 (patch)
treee15a0fae2a4eee1fe1e96b4d9df6d623175cbeaf /chrome/browser/themes
parenta2a5801c6c7eeb9b5d7a7068a6ff50a2dd51ebd8 (diff)
downloadchromium_src-57047da61489644b8b3604dffd915a1ebcf78f91.zip
chromium_src-57047da61489644b8b3604dffd915a1ebcf78f91.tar.gz
chromium_src-57047da61489644b8b3604dffd915a1ebcf78f91.tar.bz2
Revert 147915 - Cleanup gfx::Canvas now that 10562027 has landed
Reverting because composite_unittests were failing on Linux (aura) and Linux ChromeOS Tests bots. Bug=None Test=Compiles on Mac and CrOS R=oshima,sky TBR=sadrul,sail Review URL: https://chromiumcodereview.appspot.com/10701063 TBR=pkotwicz@chromium.org Review URL: https://chromiumcodereview.appspot.com/10790128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147936 0039d316-1c4b-4281-b951-d872f2087c98
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);