Index: chrome/browser/themes/browser_theme_pack.cc |
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc |
index 448e566f8025e64044e0f9c253d3cdcbe9ecd22e..a6eb6727eacd1c70851d237ee9fc4a90ae4dde3d 100644 |
--- a/chrome/browser/themes/browser_theme_pack.cc |
+++ b/chrome/browser/themes/browser_theme_pack.cc |
@@ -24,6 +24,7 @@ |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/codec/png_codec.h" |
#include "ui/gfx/image/image.h" |
+#include "ui/gfx/image/image_skia.h" |
#include "ui/gfx/skbitmap_operations.h" |
using content::BrowserThread; |
@@ -310,8 +311,9 @@ RefCountedMemory* ReadFileData(const FilePath& path) { |
gfx::Image* CreateHSLShiftedImage(const gfx::Image& image, |
const color_utils::HSL& hsl_shift) { |
std::vector<const SkBitmap*> bitmaps; |
- for (size_t i = 0; i < image.GetNumberOfSkBitmaps(); ++i) { |
- const SkBitmap* bitmap = image.GetSkBitmapAtIndex(i); |
+ const gfx::ImageSkia* image_skia = image.ToImageSkia(); |
+ for (size_t i = 0; i < image_skia->GetNumberOfBitmaps(); ++i) { |
+ const SkBitmap* bitmap = image_skia->GetBitmapAtIndex(i); |
bitmaps.push_back(new SkBitmap(SkBitmapOperations::CreateHSLShiftedBitmap( |
*bitmap, hsl_shift))); |
} |
@@ -989,9 +991,10 @@ void BrowserThemePack::GenerateTabBackgroundImages(ImageCache* bitmaps) const { |
if (it != bitmaps->end()) { |
const gfx::Image& image_to_tint = *(it->second); |
std::vector<const SkBitmap*> tinted_bitmaps; |
- for (size_t j = 0; j < image_to_tint.GetNumberOfSkBitmaps(); ++j) { |
+ const gfx::ImageSkia* image_to_tint_skia = image_to_tint.ToImageSkia(); |
+ for (size_t j = 0; j < image_to_tint_skia->GetNumberOfBitmaps(); ++j) { |
SkBitmap bg_tint = SkBitmapOperations::CreateHSLShiftedBitmap( |
- *image_to_tint.GetSkBitmapAtIndex(j), GetTintInternal( |
+ *image_to_tint_skia->GetBitmapAtIndex(j), GetTintInternal( |
ThemeService::TINT_BACKGROUND_TAB)); |
int vertical_offset = bitmaps->count(prs_id) |
? kRestoredTabVerticalOffset : 0; |