summaryrefslogtreecommitdiffstats
path: root/ui/views/painter.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 04:46:05 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 04:46:05 +0000
commit1e8ebce27abc8948772b2db088e9bcb217a539e4 (patch)
treebcd89eeff9feb6d49f2438ed81b4eeab52ce92e6 /ui/views/painter.cc
parent47a34760bc52b0b3f0edd616d10ac7b010f9f253 (diff)
downloadchromium_src-1e8ebce27abc8948772b2db088e9bcb217a539e4.zip
chromium_src-1e8ebce27abc8948772b2db088e9bcb217a539e4.tar.gz
chromium_src-1e8ebce27abc8948772b2db088e9bcb217a539e4.tar.bz2
Converts remainder of ui (except for ui/app_list) and chrome/browser/ui/views/frame to use ImageSkia
Do conversion using the same sed script as for 10437006 Modified by hand afterwards: 1 chrome/browser/download/download_util.cc 2 chrome/browser/ui/panels/panel_browser_frame_view.cc 3 chrome/browser/ui/panels/panel_browser_frame_view.h 4 chrome/browser/ui/toolbar/wrench_menu_model.cc 5 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc 6 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h 7 chrome/browser/ui/views/constrained_window_views.cc 8 chrome/browser/ui/views/frame/glass_browser_frame_view.cc 9 chrome/browser/ui/views/tab_icon_view.h 10 ui/base/dragdrop/drag_utils.h 11 ui/base/dragdrop/drag_utils_gtk.cc 12 ui/base/dragdrop/drag_utils_win.cc 13 ui/base/native_theme/native_theme_android.cc 14 ui/base/native_theme/native_theme_android.h 15 ui/base/native_theme/native_theme_base.cc 16 ui/base/native_theme/native_theme_base.h 17 ui/views/widget/native_widget_private.h 18 ui/views/window/frame_background.h 19 ui/views/window/window_resources.h Line wrapping and include fixes chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc 1 chrome/browser/ui/views/frame/browser_view.cc 2 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc 3 ui/base/dragdrop/drag_utils_aura.cc 4 ui/base/dragdrop/os_exchange_data_provider_aura.h 5 ui/base/native_theme/native_theme_aura.cc 6 ui/views/button_drag_utils.h 7 ui/views/painter.cc 8 ui/views/painter.h 9 ui/views/widget/native_widget_aura.cc 10 ui/views/widget/widget_delegate.h 11 ui/views/window/custom_frame_view.cc 12 ui/views/window/custom_frame_view.h Test=Compiles, Webkit layout tests fast/ pass Bug=124566 Review URL: https://chromiumcodereview.appspot.com/10447053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/painter.cc')
-rw-r--r--ui/views/painter.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index 5df86e7..e790888 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -5,11 +5,11 @@
#include "ui/views/painter.h"
#include "base/logging.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -61,7 +61,7 @@ class GradientPainter : public Painter {
class ImagePainter : public Painter {
public:
- ImagePainter(const SkBitmap& image,
+ ImagePainter(const gfx::ImageSkia& image,
const gfx::Insets& insets,
bool paint_center)
: image_(image),
@@ -141,7 +141,7 @@ class ImagePainter : public Painter {
}
private:
- const SkBitmap image_;
+ const gfx::ImageSkia image_;
const gfx::Insets insets_;
bool paint_center_;
@@ -172,7 +172,7 @@ Painter* Painter::CreateVerticalGradient(SkColor c1, SkColor c2) {
}
// static
-Painter* Painter::CreateImagePainter(const SkBitmap& image,
+Painter* Painter::CreateImagePainter(const gfx::ImageSkia& image,
const gfx::Insets& insets,
bool paint_center) {
return new ImagePainter(image, insets, paint_center);
@@ -181,7 +181,7 @@ Painter* Painter::CreateImagePainter(const SkBitmap& image,
HorizontalPainter::HorizontalPainter(const int image_resource_names[]) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
for (int i = 0; i < 3; ++i)
- images_[i] = rb.GetImageNamed(image_resource_names[i]).ToSkBitmap();
+ images_[i] = rb.GetImageNamed(image_resource_names[i]).ToImageSkia();
height_ = images_[LEFT]->height();
DCHECK(images_[LEFT]->height() == images_[RIGHT]->height() &&
images_[LEFT]->height() == images_[CENTER]->height());