summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/desktop_background/desktop_background_view.cc6
-rw-r--r--ash/launcher/tabbed_launcher_button.cc4
-rw-r--r--ash/wm/frame_painter.cc28
-rw-r--r--ash/wm/image_grid.cc2
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc2
-rw-r--r--chrome/browser/chromeos/status/network_menu_icon.cc24
-rw-r--r--chrome/browser/download/download_util.cc20
-rw-r--r--chrome/browser/extensions/extension_icon_manager.cc2
-rw-r--r--chrome/browser/profiles/profile_info_util.cc6
-rw-r--r--chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm14
-rw-r--r--chrome/browser/ui/gtk/avatar_menu_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/download/download_item_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc8
-rw-r--r--chrome/browser/ui/panels/panel_browser_frame_view.cc14
-rw-r--r--chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc4
-rw-r--r--chrome/browser/ui/views/avatar_menu_bubble_view.cc8
-rw-r--r--chrome/browser/ui/views/avatar_menu_button.cc2
-rw-r--r--chrome/browser/ui/views/download/download_item_view.cc22
-rw-r--r--chrome/browser/ui/views/dropdown_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc6
-rw-r--r--chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc28
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc14
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc34
-rw-r--r--chrome/browser/ui/views/infobars/extension_infobar.cc8
-rw-r--r--chrome/browser/ui/views/location_bar/keyword_hint_view.cc6
-rw-r--r--chrome/browser/ui/views/tab_icon_view.cc6
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc8
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc26
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.cc22
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc6
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc8
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_login_handler.cc2
-rw-r--r--chrome/common/badge_util.cc2
-rw-r--r--ui/base/dragdrop/drag_utils.cc2
-rw-r--r--ui/base/native_theme/native_theme_android.cc12
-rw-r--r--ui/base/native_theme/native_theme_android.h20
-rw-r--r--ui/base/native_theme/native_theme_base.cc16
-rw-r--r--ui/base/native_theme/native_theme_base.h6
-rw-r--r--ui/gfx/canvas.cc34
-rw-r--r--ui/gfx/canvas.h26
-rw-r--r--ui/gfx/canvas_linux.cc2
-rw-r--r--ui/gfx/canvas_skia.cc2
-rw-r--r--ui/gfx/canvas_win.cc2
-rw-r--r--ui/views/bubble/bubble_border.cc14
-rw-r--r--ui/views/controls/button/image_button.cc6
-rw-r--r--ui/views/controls/button/menu_button.cc2
-rw-r--r--ui/views/controls/button/text_button.cc30
-rw-r--r--ui/views/controls/combobox/native_combobox_views.cc2
-rw-r--r--ui/views/controls/glow_hover_controller.cc4
-rw-r--r--ui/views/controls/image_view.cc4
-rw-r--r--ui/views/controls/menu/menu_image_util.cc2
-rw-r--r--ui/views/controls/menu/menu_item_view_views.cc12
-rw-r--r--ui/views/controls/menu/menu_item_view_win.cc2
-rw-r--r--ui/views/controls/scrollbar/bitmap_scroll_bar.cc8
-rw-r--r--ui/views/controls/table/table_view_views.cc2
-rw-r--r--ui/views/controls/table/table_view_win.cc2
-rw-r--r--ui/views/controls/throbber.cc10
-rw-r--r--ui/views/controls/tree/tree_view_views.cc2
-rw-r--r--ui/views/controls/tree/tree_view_win.cc2
-rw-r--r--ui/views/painter.cc28
-rw-r--r--ui/views/window/custom_frame_view.cc12
-rw-r--r--ui/views/window/frame_background.cc40
64 files changed, 334 insertions, 334 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 8dcc4a3..c3028fc 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -103,7 +103,7 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
}
gfx::Rect wallpaper_cropped_rect = wallpaper_rect.Center(cropped_size);
- canvas->DrawBitmapInt(wallpaper_,
+ canvas->DrawImageInt(wallpaper_,
wallpaper_cropped_rect.x(), wallpaper_cropped_rect.y(),
wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(),
0, 0, width(), height(),
@@ -112,11 +112,11 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
canvas->TileImageInt(wallpaper_, 0, 0, width(), height());
} else if (wallpaper_layout_ == ash::STRETCH) {
// This is generally not recommended as it may show artifacts.
- canvas->DrawBitmapInt(wallpaper_, 0, 0, wallpaper_.width(),
+ canvas->DrawImageInt(wallpaper_, 0, 0, wallpaper_.width(),
wallpaper_.height(), 0, 0, width(), height(), true);
} else {
// All other are simply centered, and not scaled (but may be clipped).
- canvas->DrawBitmapInt(wallpaper_, (width() - wallpaper_.width()) / 2,
+ canvas->DrawImageInt(wallpaper_, (width() - wallpaper_.width()) / 2,
(height() - wallpaper_.height()) / 2);
}
}
diff --git a/ash/launcher/tabbed_launcher_button.cc b/ash/launcher/tabbed_launcher_button.cc
index 398e210..4bee325 100644
--- a/ash/launcher/tabbed_launcher_button.cc
+++ b/ash/launcher/tabbed_launcher_button.cc
@@ -91,12 +91,12 @@ void TabbedLauncherButton::IconView::OnPaint(gfx::Canvas* canvas) {
int x = (width() - animating_image_.width()) / 2;
int y = (height() - animating_image_.height()) / 2;
canvas->SaveLayerAlpha(animation_->CurrentValueBetween(255, 0));
- canvas->DrawBitmapInt(animating_image_, x, y);
+ canvas->DrawImageInt(animating_image_, x, y);
canvas->Restore();
} else {
int x = (width() - image_.width()) / 2;
int y = (height() - image_.height()) / 2;
- canvas->DrawBitmapInt(image_, x, y);
+ canvas->DrawImageInt(image_, x, y);
}
}
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 7623164..617b22ea 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -366,13 +366,13 @@ void FramePainter::PaintHeader(views::NonClientFrameView* view,
// Draw the theme frame overlay, if available.
if (theme_frame_overlay)
- canvas->DrawBitmapInt(*theme_frame_overlay, 0, 0);
+ canvas->DrawImageInt(*theme_frame_overlay, 0, 0);
// Separator between the maximize and close buttons. It overlaps the left
// edge of the close button.
- canvas->DrawBitmapInt(*button_separator_,
- close_button_->x(),
- close_button_->y());
+ canvas->DrawImageInt(*button_separator_,
+ close_button_->x(),
+ close_button_->y());
// We don't need the extra lightness in the edges when we're at the top edge
// of the screen.
@@ -383,22 +383,22 @@ void FramePainter::PaintHeader(views::NonClientFrameView* view,
// Draw the top corners and edge.
int top_left_height = top_left_corner_->height();
- canvas->DrawBitmapInt(*top_left_corner_,
- 0, 0, top_left_corner_->width(), top_left_height,
- 0, 0, top_left_corner_->width(), top_left_height,
- false);
+ canvas->DrawImageInt(*top_left_corner_,
+ 0, 0, top_left_corner_->width(), top_left_height,
+ 0, 0, top_left_corner_->width(), top_left_height,
+ false);
canvas->TileImageInt(*top_edge_,
top_left_corner_->width(),
0,
view->width() - top_left_corner_->width() - top_right_corner_->width(),
top_edge_->height());
int top_right_height = top_right_corner_->height();
- canvas->DrawBitmapInt(*top_right_corner_,
- 0, 0,
- top_right_corner_->width(), top_right_height,
- view->width() - top_right_corner_->width(), 0,
- top_right_corner_->width(), top_right_height,
- false);
+ canvas->DrawImageInt(*top_right_corner_,
+ 0, 0,
+ top_right_corner_->width(), top_right_height,
+ view->width() - top_right_corner_->width(), 0,
+ top_right_corner_->width(), top_right_height,
+ false);
// Header left edge.
int header_left_height = theme_frame->height() - top_left_height;
diff --git a/ash/wm/image_grid.cc b/ash/wm/image_grid.cc
index 54ccca3..5b275e3 100644
--- a/ash/wm/image_grid.cc
+++ b/ash/wm/image_grid.cc
@@ -227,7 +227,7 @@ void ImageGrid::ImagePainter::SetClipRect(const gfx::Rect& clip_rect,
void ImageGrid::ImagePainter::OnPaintLayer(gfx::Canvas* canvas) {
if (!clip_rect_.IsEmpty())
canvas->ClipRect(clip_rect_);
- canvas->DrawBitmapInt(*(image_->ToImageSkia()), 0, 0);
+ canvas->DrawImageInt(*(image_->ToImageSkia()), 0, 0);
}
void ImageGrid::ImagePainter::OnDeviceScaleFactorChanged(
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index 4b3ee2d..9ff22ea 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -75,7 +75,7 @@ class MultiWindowResizeController::ResizeView : public views::View {
return gfx::Size(image_->width(), image_->height());
}
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->DrawBitmapInt(*image_, 0, 0);
+ canvas->DrawImageInt(*image_, 0, 0);
}
virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE {
gfx::Point location(event.location());
diff --git a/chrome/browser/chromeos/status/network_menu_icon.cc b/chrome/browser/chromeos/status/network_menu_icon.cc
index 9fb2c37..923151d 100644
--- a/chrome/browser/chromeos/status/network_menu_icon.cc
+++ b/chrome/browser/chromeos/status/network_menu_icon.cc
@@ -169,10 +169,10 @@ const gfx::ImageSkia GetVpnResource(int resource_id) {
const gfx::ImageSkia* ethernet_icon = rb.GetImageSkiaNamed(resource_id);
gfx::Canvas canvas(
gfx::Size(ethernet_icon->width(), ethernet_icon->height()), false);
- canvas.DrawBitmapInt(*ethernet_icon, 0, 0);
+ canvas.DrawImageInt(*ethernet_icon, 0, 0);
const gfx::ImageSkia* vpn_badge = rb.GetImageSkiaNamed(kVpnBadgeId);
int y = ethernet_icon->height() - vpn_badge->height();
- canvas.DrawBitmapInt(*vpn_badge, kBadgeLeftX, y);
+ canvas.DrawImageInt(*vpn_badge, kBadgeLeftX, y);
return canvas.ExtractBitmap();
}
@@ -748,19 +748,19 @@ const gfx::ImageSkia NetworkMenuIcon::GenerateImageFromComponents(
canvas.sk_canvas()->scale(SkFloatToScalar(dip_scale),
SkFloatToScalar(dip_scale));
if (top_left_badge)
- canvas.DrawBitmapInt(*top_left_badge, kBadgeLeftX, kBadgeTopY);
+ canvas.DrawImageInt(*top_left_badge, kBadgeLeftX, kBadgeTopY);
if (top_right_badge)
- canvas.DrawBitmapInt(*top_right_badge,
- dip_width - top_right_badge->width(),
- kBadgeTopY);
+ canvas.DrawImageInt(*top_right_badge,
+ dip_width - top_right_badge->width(),
+ kBadgeTopY);
if (bottom_left_badge)
- canvas.DrawBitmapInt(*bottom_left_badge,
- kBadgeLeftX,
- dip_height - bottom_left_badge->height());
+ canvas.DrawImageInt(*bottom_left_badge,
+ kBadgeLeftX,
+ dip_height - bottom_left_badge->height());
if (bottom_right_badge)
- canvas.DrawBitmapInt(*bottom_right_badge,
- dip_width - bottom_right_badge->width(),
- dip_height - bottom_right_badge->height());
+ canvas.DrawImageInt(*bottom_right_badge,
+ dip_width - bottom_right_badge->width(),
+ dip_height - bottom_right_badge->height());
badged.AddBitmapForScale(canvas.ExtractBitmap(), dip_scale);
}
return badged;
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 1119df0..82daaad 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -234,10 +234,10 @@ void PaintDownloadProgress(gfx::Canvas* canvas,
// Draw the background progress image.
SkPaint background_paint;
- canvas->DrawBitmapInt(*background,
- background_bounds.x(),
- background_bounds.y(),
- background_paint);
+ canvas->DrawImageInt(*background,
+ background_bounds.x(),
+ background_bounds.y(),
+ background_paint);
// Layer the foreground progress image in an arc proportional to the download
// progress. The arc grows clockwise, starting in the midnight position, as
@@ -286,10 +286,10 @@ void PaintDownloadProgress(gfx::Canvas* canvas,
return;
}
- canvas->DrawBitmapInt(*foreground,
- foreground_bounds.x(),
- foreground_bounds.y(),
- foreground_paint);
+ canvas->DrawImageInt(*foreground,
+ foreground_bounds.x(),
+ foreground_bounds.y(),
+ foreground_paint);
}
void PaintDownloadComplete(gfx::Canvas* canvas,
@@ -320,7 +320,7 @@ void PaintDownloadComplete(gfx::Canvas* canvas,
// at zero opacity.
canvas->SaveLayerAlpha(GetOpacity(animation_progress), complete_bounds);
canvas->sk_canvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
- canvas->DrawBitmapInt(*complete, complete_bounds.x(), complete_bounds.y());
+ canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y());
canvas->Restore();
}
@@ -352,7 +352,7 @@ void PaintDownloadInterrupted(gfx::Canvas* canvas,
// at full opacity.
canvas->SaveLayerAlpha(GetOpacity(1.0 - animation_progress), complete_bounds);
canvas->sk_canvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
- canvas->DrawBitmapInt(*complete, complete_bounds.x(), complete_bounds.y());
+ canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y());
canvas->Restore();
}
diff --git a/chrome/browser/extensions/extension_icon_manager.cc b/chrome/browser/extensions/extension_icon_manager.cc
index c81fee6..7f57da2 100644
--- a/chrome/browser/extensions/extension_icon_manager.cc
+++ b/chrome/browser/extensions/extension_icon_manager.cc
@@ -28,7 +28,7 @@ static SkBitmap ApplyPadding(const SkBitmap& source,
scoped_ptr<gfx::Canvas> result(
new gfx::Canvas(gfx::Size(source.width() + padding.width(),
source.height() + padding.height()), false));
- result->DrawBitmapInt(
+ result->DrawImageInt(
source,
0, 0, source.width(), source.height(),
padding.left(), padding.top(), source.width(), source.height(),
diff --git a/chrome/browser/profiles/profile_info_util.cc b/chrome/browser/profiles/profile_info_util.cc
index a76787d..83d38f5 100644
--- a/chrome/browser/profiles/profile_info_util.cc
+++ b/chrome/browser/profiles/profile_info_util.cc
@@ -26,7 +26,7 @@ gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
// Draw the icon centered on the canvas.
int x = (kAvatarIconWidth - length) / 2;
int y = (kAvatarIconHeight - length) / 2;
- canvas.DrawBitmapInt(bmp, x, y);
+ canvas.DrawImageInt(bmp, x, y);
// Draw a gray border on the inside of the icon.
SkColor color = SkColorSetARGB(83, 0, 0, 0);
@@ -48,7 +48,7 @@ gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
// Draw the icon centered on the canvas.
int x = (kAvatarIconWidth - length) / 2;
int y = (kAvatarIconHeight - length) / 2;
- canvas.DrawBitmapInt(bmp, x, y);
+ canvas.DrawImageInt(bmp, x, y);
return gfx::Image(canvas.ExtractBitmap());
}
@@ -71,7 +71,7 @@ gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
int x2 = x1 + length;
int y1 = dst_height - length - 1;
int y2 = y1 + length;
- canvas.DrawBitmapInt(bmp, x1, y1);
+ canvas.DrawImageInt(bmp, x1, y1);
// Give the icon an etched look by drawing a highlight on the bottom edge
// and a shadow on the remaining edges.
diff --git a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
index 6bae992..b0dc08f 100644
--- a/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm
@@ -105,13 +105,13 @@ class InfobarBridge : public ExtensionInfoBarDelegate::DelegateObserver,
new gfx::Canvas(
gfx::Size(image_size + kDropArrowLeftMarginPx + drop_image->width(),
image_size), false));
- canvas->DrawBitmapInt(*icon,
- 0, 0, icon->width(), icon->height(),
- 0, 0, image_size, image_size,
- false);
- canvas->DrawBitmapInt(*drop_image,
- image_size + kDropArrowLeftMarginPx,
- image_size / 2);
+ canvas->DrawImageInt(*icon,
+ 0, 0, icon->width(), icon->height(),
+ 0, 0, image_size, image_size,
+ false);
+ canvas->DrawImageInt(*drop_image,
+ image_size + kDropArrowLeftMarginPx,
+ image_size / 2);
[owner_ setButtonImage:gfx::SkBitmapToNSImage(canvas->ExtractBitmap())];
}
diff --git a/chrome/browser/ui/gtk/avatar_menu_item_gtk.cc b/chrome/browser/ui/gtk/avatar_menu_item_gtk.cc
index ee1c26e..1a652cc 100644
--- a/chrome/browser/ui/gtk/avatar_menu_item_gtk.cc
+++ b/chrome/browser/ui/gtk/avatar_menu_item_gtk.cc
@@ -216,7 +216,7 @@ void AvatarMenuItemGtk::Init(GtkThemeService* theme_service) {
gfx::Rect check_rect(0, 0, check_image->width(), check_image->height());
int y = avatar_image->height() - check_image->height();
int x = avatar_image->width() - check_image->width() + kCheckMarkXOffset;
- canvas.DrawBitmapInt(*check_image, x, y);
+ canvas.DrawImageInt(*check_image, x, y);
SkBitmap final_image = canvas.ExtractBitmap();
avatar_pixbuf = gfx::GdkPixbufFromSkBitmap(final_image);
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 364a22d..2351096 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -686,9 +686,9 @@ gboolean BrowserToolbarGtk::OnWrenchMenuButtonExpose(GtkWidget* sender,
gfx::CanvasSkiaPaint canvas(expose, false);
int x_offset = base::i18n::IsRTL() ? 0 : allocation.width - badge->width();
int y_offset = 0;
- canvas.DrawBitmapInt(*badge,
- allocation.x + x_offset,
- allocation.y + y_offset);
+ canvas.DrawImageInt(*badge,
+ allocation.x + x_offset,
+ allocation.y + y_offset);
return FALSE;
}
diff --git a/chrome/browser/ui/gtk/download/download_item_gtk.cc b/chrome/browser/ui/gtk/download/download_item_gtk.cc
index 2c97f49..35118a2 100644
--- a/chrome/browser/ui/gtk/download/download_item_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_item_gtk.cc
@@ -872,7 +872,7 @@ gboolean DownloadItemGtk::OnProgressAreaExpose(GtkWidget* widget,
// there is no need to use the chromium-specific default download item icon.
if (icon_small_) {
const int offset = download_util::kSmallProgressIconOffset;
- canvas.DrawBitmapInt(*icon_small_->ToSkBitmap(),
+ canvas.DrawImageInt(*icon_small_->ToSkBitmap(),
allocation.x + offset, allocation.y + offset);
}
diff --git a/chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc
index cdac8db..4e5ff10 100644
--- a/chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc
@@ -86,10 +86,10 @@ void ExtensionInfoBarGtk::OnImageLoaded(const gfx::Image& image,
scoped_ptr<gfx::Canvas> canvas(new gfx::Canvas(
gfx::Size(image_size + kDropArrowLeftMargin + drop_image->width(),
image_size), false));
- canvas->DrawBitmapInt(*icon, 0, 0, icon->width(), icon->height(), 0, 0,
- image_size, image_size, false);
- canvas->DrawBitmapInt(*drop_image, image_size + kDropArrowLeftMargin,
- image_size / 2);
+ canvas->DrawImageInt(*icon, 0, 0, icon->width(), icon->height(), 0, 0,
+ image_size, image_size, false);
+ canvas->DrawImageInt(*drop_image, image_size + kDropArrowLeftMargin,
+ image_size / 2);
SkBitmap bitmap = canvas->ExtractBitmap();
GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(bitmap);
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.cc b/chrome/browser/ui/panels/panel_browser_frame_view.cc
index 78b7cd6..ffa5c7e 100644
--- a/chrome/browser/ui/panels/panel_browser_frame_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_frame_view.cc
@@ -698,17 +698,17 @@ void PanelBrowserFrameView::PaintFrameBackground(gfx::Canvas* canvas) {
// transition which looks bad.
// Left border, below title-bar.
- canvas->DrawBitmapInt(*image, 0, top_area_height - 1, thickness, 1,
+ canvas->DrawImageInt(*image, 0, top_area_height - 1, thickness, 1,
0, top_area_height, thickness, height() - top_area_height, false);
// Right border, below title-bar.
- canvas->DrawBitmapInt(*image, (width() % image->width()) - thickness,
+ canvas->DrawImageInt(*image, (width() % image->width()) - thickness,
top_area_height - 1, thickness, 1,
width() - thickness, top_area_height,
thickness, height() - top_area_height, false);
// Bottom border.
- canvas->DrawBitmapInt(*image, 0, top_area_height - 1, image->width(), 1,
+ canvas->DrawImageInt(*image, 0, top_area_height - 1, image->width(), 1,
0, height() - thickness, width(), thickness, false);
}
@@ -720,11 +720,11 @@ void PanelBrowserFrameView::PaintFrameEdge(gfx::Canvas* canvas) {
// Draw the top border.
const EdgeResources& frame_edges = GetFrameEdges();
- canvas->DrawBitmapInt(*(frame_edges.top_left), 0, 0);
+ canvas->DrawImageInt(*(frame_edges.top_left), 0, 0);
canvas->TileImageInt(
*(frame_edges.top), frame_edges.top_left->width(), 0,
width() - frame_edges.top_right->width(), frame_edges.top->height());
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
*(frame_edges.top_right),
width() - frame_edges.top_right->width(), 0);
@@ -736,7 +736,7 @@ void PanelBrowserFrameView::PaintFrameEdge(gfx::Canvas* canvas) {
frame_edges.bottom_right->height());
// Draw the bottom border.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
*(frame_edges.bottom_right),
width() - frame_edges.bottom_right->width(),
height() - frame_edges.bottom_right->height());
@@ -746,7 +746,7 @@ void PanelBrowserFrameView::PaintFrameEdge(gfx::Canvas* canvas) {
width() - frame_edges.bottom_left->width() -
frame_edges.bottom_right->width(),
frame_edges.bottom->height());
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
*(frame_edges.bottom_left), 0,
height() - frame_edges.bottom_left->height());
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
index 46f50f2..f14d929 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
@@ -617,8 +617,8 @@ void AutocompleteResultView::OnPaint(gfx::Canvas* canvas) {
if (!match_.associated_keyword.get() ||
keyword_icon_->x() > icon_bounds_.right()) {
// Paint the icon.
- canvas->DrawBitmapInt(*GetIcon(), GetMirroredXForRect(icon_bounds_),
- icon_bounds_.y());
+ canvas->DrawImageInt(*GetIcon(), GetMirroredXForRect(icon_bounds_),
+ icon_bounds_.y());
// Paint the text.
int x = GetMirroredXForRect(text_bounds_);
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
index f78fdb2..bcab2e7 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.cc
@@ -325,10 +325,10 @@ gfx::ImageSkia ProfileItemView::GetBadgedIcon(const gfx::ImageSkia& icon) {
int height = icon_rect.height() + badge->height() * kBadgeOverlapRatioY;
gfx::Canvas canvas(gfx::Size(width, height), false);
- canvas.DrawBitmapInt(icon, 0, 0, icon.width(), icon.height(), 0, 0,
- icon_rect.width(), icon_rect.height(), true);
- canvas.DrawBitmapInt(*badge, width - badge->width(),
- height - badge->height());
+ canvas.DrawImageInt(icon, 0, 0, icon.width(), icon.height(), 0, 0,
+ icon_rect.width(), icon_rect.height(), true);
+ canvas.DrawImageInt(*badge, width - badge->width(),
+ height - badge->height());
return canvas.ExtractBitmap();
}
diff --git a/chrome/browser/ui/views/avatar_menu_button.cc b/chrome/browser/ui/views/avatar_menu_button.cc
index 154c97f..6f1ef5d 100644
--- a/chrome/browser/ui/views/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/avatar_menu_button.cc
@@ -128,7 +128,7 @@ void AvatarMenuButton::OnPaint(gfx::Canvas* canvas) {
// incognito image has shadows at the top that make the apparent center below
// the real center.
int dst_y = Round((height() - dst_height) / 2.0);
- canvas->DrawBitmapInt(button_icon_, 0, 0, button_icon_.width(),
+ canvas->DrawImageInt(button_icon_, 0, 0, button_icon_.width(),
button_icon_.height(), dst_x, dst_y, dst_width, dst_height, false);
}
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 1dba4ef..b4a88e0 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -894,12 +894,12 @@ void DownloadItemView::OnPaint(gfx::Canvas* canvas) {
}
icon_x = GetMirroredXWithWidthInView(icon_x, icon->width());
if (enabled()) {
- canvas->DrawBitmapInt(*icon, icon_x, icon_y);
+ canvas->DrawImageInt(*icon, icon_x, icon_y);
} else {
// Use an alpha to make the image look disabled.
SkPaint paint;
paint.setAlpha(120);
- canvas->DrawBitmapInt(*icon, icon_x, icon_y, paint);
+ canvas->DrawImageInt(*icon, icon_x, icon_y, paint);
}
}
}
@@ -940,19 +940,19 @@ void DownloadItemView::PaintImages(gfx::Canvas* canvas,
int x, int y, int height, int width) {
int middle_height = height - top_image->height() - bottom_image->height();
// Draw the top.
- canvas->DrawBitmapInt(*top_image,
- 0, 0, top_image->width(), top_image->height(),
- x, y, width, top_image->height(), false);
+ canvas->DrawImageInt(*top_image,
+ 0, 0, top_image->width(), top_image->height(),
+ x, y, width, top_image->height(), false);
y += top_image->height();
// Draw the center.
- canvas->DrawBitmapInt(*center_image,
- 0, 0, center_image->width(), center_image->height(),
- x, y, width, middle_height, false);
+ canvas->DrawImageInt(*center_image,
+ 0, 0, center_image->width(), center_image->height(),
+ x, y, width, middle_height, false);
y += middle_height;
// Draw the bottom.
- canvas->DrawBitmapInt(*bottom_image,
- 0, 0, bottom_image->width(), bottom_image->height(),
- x, y, width, bottom_image->height(), false);
+ canvas->DrawImageInt(*bottom_image,
+ 0, 0, bottom_image->width(), bottom_image->height(),
+ x, y, width, bottom_image->height(), false);
}
void DownloadItemView::SetState(State body_state, State drop_down_state) {
diff --git a/chrome/browser/ui/views/dropdown_bar_view.cc b/chrome/browser/ui/views/dropdown_bar_view.cc
index 4ef555b..4efcd28 100644
--- a/chrome/browser/ui/views/dropdown_bar_view.cc
+++ b/chrome/browser/ui/views/dropdown_bar_view.cc
@@ -77,12 +77,12 @@ void DropdownBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
SkPaint paint;
paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
// Draw left edge.
- canvas->DrawBitmapInt(*left_alpha_mask_, 0, 0, left_edge_width, mask_height,
+ canvas->DrawImageInt(*left_alpha_mask_, 0, 0, left_edge_width, mask_height,
0, 0, left_edge_width, height, false, paint);
// Draw right edge.
int x_right_edge = view->bounds().width() - right_edge_width;
- canvas->DrawBitmapInt(*right_alpha_mask_, 0, 0, right_edge_width,
+ canvas->DrawImageInt(*right_alpha_mask_, 0, 0, right_edge_width,
mask_height, x_right_edge, 0, right_edge_width, height, false, paint);
}
@@ -115,7 +115,7 @@ void DropdownBarView::OnPaint(gfx::Canvas* canvas) {
canvas->Translate(bounds().origin());
OnPaintBackground(&animating_edges);
OnPaintBorder(&animating_edges);
- canvas->DrawBitmapInt(animating_edges.ExtractBitmap(), bounds().x(),
+ canvas->DrawImageInt(animating_edges.ExtractBitmap(), bounds().x(),
animation_offset());
}
}
diff --git a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
index 14e8ccd..f6563ed 100644
--- a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
+++ b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
@@ -118,9 +118,9 @@ class AppNonClientFrameViewAura::ControlView
views::View::OnPaint(canvas);
// Separator overlaps the left edge of the close button.
- canvas->DrawBitmapInt(*separator_,
- close_button_->x(), 0);
- canvas->DrawBitmapInt(*shadow_, 0, kShadowHeightStretch);
+ canvas->DrawImageInt(*separator_,
+ close_button_->x(), 0);
+ canvas->DrawImageInt(*shadow_, 0, kShadowHeightStretch);
}
void ButtonPressed(views::Button* sender,
diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
index 946d58e..2136ad0 100644
--- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
@@ -361,11 +361,11 @@ void AppPanelBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
canvas->TileImageInt(*theme_frame, 0, 0, width(), theme_frame->height());
// Top.
- canvas->DrawBitmapInt(*top_left_corner, 0, 0);
+ canvas->DrawImageInt(*top_left_corner, 0, 0);
canvas->TileImageInt(*top_edge, top_left_corner->width(), 0,
width() - top_right_corner->width(), top_edge->height());
- canvas->DrawBitmapInt(*top_right_corner,
- width() - top_right_corner->width(), 0);
+ canvas->DrawImageInt(*top_right_corner,
+ width() - top_right_corner->width(), 0);
// Right.
canvas->TileImageInt(*right_edge, width() - right_edge->width(),
@@ -373,15 +373,15 @@ void AppPanelBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
height() - top_right_corner->height() - bottom_right_corner->height());
// Bottom.
- canvas->DrawBitmapInt(*bottom_right_corner,
- width() - bottom_right_corner->width(),
- height() - bottom_right_corner->height());
+ canvas->DrawImageInt(*bottom_right_corner,
+ width() - bottom_right_corner->width(),
+ height() - bottom_right_corner->height());
canvas->TileImageInt(*bottom_edge, bottom_left_corner->width(),
height() - bottom_edge->height(),
width() - bottom_left_corner->width() - bottom_right_corner->width(),
bottom_edge->height());
- canvas->DrawBitmapInt(*bottom_left_corner, 0,
- height() - bottom_left_corner->height());
+ canvas->DrawImageInt(*bottom_left_corner, 0,
+ height() - bottom_left_corner->height());
// Left.
canvas->TileImageInt(*left_edge, 0, top_left_corner->height(),
@@ -431,11 +431,11 @@ void AppPanelBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
// Top.
int top_edge_y = client_area_top - top->height();
- canvas->DrawBitmapInt(*top_left, client_area_bounds.x() - top_left->width(),
- top_edge_y);
+ canvas->DrawImageInt(*top_left, client_area_bounds.x() - top_left->width(),
+ top_edge_y);
canvas->TileImageInt(*top, client_area_bounds.x(), top_edge_y,
client_area_bounds.width(), top->height());
- canvas->DrawBitmapInt(*top_right, client_area_bounds.right(), top_edge_y);
+ canvas->DrawImageInt(*top_right, client_area_bounds.right(), top_edge_y);
// Right.
int client_area_bottom =
@@ -445,11 +445,11 @@ void AppPanelBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
right->width(), client_area_height);
// Bottom.
- canvas->DrawBitmapInt(*bottom_right, client_area_bounds.right(),
- client_area_bottom);
+ canvas->DrawImageInt(*bottom_right, client_area_bounds.right(),
+ client_area_bottom);
canvas->TileImageInt(*bottom, client_area_bounds.x(), client_area_bottom,
client_area_bounds.width(), bottom_right->height());
- canvas->DrawBitmapInt(*bottom_left,
+ canvas->DrawImageInt(*bottom_left,
client_area_bounds.x() - bottom_left->width(), client_area_bottom);
// Left.
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e909901..9f517bf 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -257,8 +257,8 @@ class ResizeCorner : public views::View {
gfx::ImageSkia* image = ui::ResourceBundle::GetSharedInstance().
GetImageSkiaNamed(IDR_TEXTAREA_RESIZER);
- canvas->DrawBitmapInt(*image, width() - image->width(),
- height() - image->height());
+ canvas->DrawImageInt(*image, width() - image->width(),
+ height() - image->height());
}
static gfx::Size GetSize() {
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 7f90a74..fcc500d 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -307,23 +307,23 @@ void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
paint.setXfermodeMode(SkXfermode::kDstIn_Mode);
// Mask out the top left corner.
- canvas->DrawBitmapInt(*toolbar_left_mask, left_x, y, paint);
+ canvas->DrawImageInt(*toolbar_left_mask, left_x, y, paint);
// Mask out the top right corner.
int right_x =
x + w + kContentEdgeShadowThickness - toolbar_right_mask->width();
- canvas->DrawBitmapInt(*toolbar_right_mask, right_x, y, paint);
+ canvas->DrawImageInt(*toolbar_right_mask, right_x, y, paint);
// Draw left edge.
- canvas->DrawBitmapInt(*toolbar_left, left_x, y);
+ canvas->DrawImageInt(*toolbar_left, left_x, y);
// Draw center edge.
canvas->TileImageInt(*toolbar_center, left_x + toolbar_left->width(), y,
right_x - (left_x + toolbar_left->width()), toolbar_center->height());
// Right edge.
- canvas->DrawBitmapInt(*tp->GetImageSkiaNamed(IDR_CONTENT_TOP_RIGHT_CORNER),
- right_x, y);
+ canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_TOP_RIGHT_CORNER),
+ right_x, y);
// Draw the content/toolbar separator.
canvas->FillRect(gfx::Rect(x + kClientEdgeThickness,
@@ -350,7 +350,7 @@ void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
gfx::ImageSkia* right = tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE);
canvas->TileImageInt(*right, client_area_bounds.right(), client_area_top,
right->width(), client_area_height);
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER),
client_area_bounds.right(), client_area_bottom);
gfx::ImageSkia* bottom = tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER);
@@ -359,7 +359,7 @@ void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
bottom->height());
gfx::ImageSkia* bottom_left =
tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER);
- canvas->DrawBitmapInt(*bottom_left,
+ canvas->DrawImageInt(*bottom_left,
client_area_bounds.x() - bottom_left->width(), client_area_bottom);
gfx::ImageSkia* left = tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE);
canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 942a23b..f2f2674 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -671,10 +671,10 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
// Mask the left edge.
int left_x = x - kContentEdgeShadowThickness;
- canvas->DrawBitmapInt(*toolbar_left_mask, 0, 0, toolbar_left_mask->width(),
- split_point, left_x, y, toolbar_left_mask->width(),
- split_point, false, paint);
- canvas->DrawBitmapInt(*toolbar_left_mask, 0,
+ canvas->DrawImageInt(*toolbar_left_mask, 0, 0, toolbar_left_mask->width(),
+ split_point, left_x, y, toolbar_left_mask->width(),
+ split_point, false, paint);
+ canvas->DrawImageInt(*toolbar_left_mask, 0,
toolbar_left_mask->height() - bottom_edge_height,
toolbar_left_mask->width(), bottom_edge_height, left_x, bottom_y,
toolbar_left_mask->width(), bottom_edge_height, false, paint);
@@ -682,18 +682,18 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
// Mask the right edge.
int right_x =
x + w - toolbar_right_mask->width() + kContentEdgeShadowThickness;
- canvas->DrawBitmapInt(*toolbar_right_mask, 0, 0, toolbar_right_mask->width(),
- split_point, right_x, y, toolbar_right_mask->width(),
- split_point, false, paint);
- canvas->DrawBitmapInt(*toolbar_right_mask, 0,
+ canvas->DrawImageInt(*toolbar_right_mask, 0, 0, toolbar_right_mask->width(),
+ split_point, right_x, y, toolbar_right_mask->width(),
+ split_point, false, paint);
+ canvas->DrawImageInt(*toolbar_right_mask, 0,
toolbar_right_mask->height() - bottom_edge_height,
toolbar_right_mask->width(), bottom_edge_height, right_x, bottom_y,
toolbar_right_mask->width(), bottom_edge_height, false, paint);
canvas->Restore();
- canvas->DrawBitmapInt(*toolbar_left, 0, 0, toolbar_left->width(), split_point,
- left_x, y, toolbar_left->width(), split_point, false);
- canvas->DrawBitmapInt(*toolbar_left, 0,
+ canvas->DrawImageInt(*toolbar_left, 0, 0, toolbar_left->width(), split_point,
+ left_x, y, toolbar_left->width(), split_point, false);
+ canvas->DrawImageInt(*toolbar_left, 0,
toolbar_left->height() - bottom_edge_height, toolbar_left->width(),
bottom_edge_height, left_x, bottom_y, toolbar_left->width(),
bottom_edge_height, false);
@@ -706,9 +706,9 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
gfx::ImageSkia* toolbar_right = tp->GetImageSkiaNamed(
IDR_CONTENT_TOP_RIGHT_CORNER);
- canvas->DrawBitmapInt(*toolbar_right, 0, 0, toolbar_right->width(),
+ canvas->DrawImageInt(*toolbar_right, 0, 0, toolbar_right->width(),
split_point, right_x, y, toolbar_right->width(), split_point, false);
- canvas->DrawBitmapInt(*toolbar_right, 0,
+ canvas->DrawImageInt(*toolbar_right, 0,
toolbar_right->height() - bottom_edge_height, toolbar_right->width(),
bottom_edge_height, right_x, bottom_y, toolbar_right->width(),
bottom_edge_height, false);
@@ -747,12 +747,12 @@ void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
int top_edge_y = client_area_top - top_center->height();
int height = client_area_top - top_edge_y;
- canvas->DrawBitmapInt(*top_left, 0, 0, top_left->width(), height,
+ canvas->DrawImageInt(*top_left, 0, 0, top_left->width(), height,
client_area_bounds.x() - top_left->width(), top_edge_y,
top_left->width(), height, false);
canvas->TileImageInt(*top_center, 0, 0, client_area_bounds.x(), top_edge_y,
client_area_bounds.width(), std::min(height, top_center->height()));
- canvas->DrawBitmapInt(*top_right, 0, 0, top_right->width(), height,
+ canvas->DrawImageInt(*top_right, 0, 0, top_right->width(), height,
client_area_bounds.right(), top_edge_y,
top_right->width(), height, false);
@@ -772,7 +772,7 @@ void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
gfx::ImageSkia* right = tp->GetImageSkiaNamed(IDR_CONTENT_RIGHT_SIDE);
canvas->TileImageInt(*right, client_area_bounds.right(), image_top,
right->width(), image_height);
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER),
client_area_bounds.right(), client_area_bottom);
gfx::ImageSkia* bottom = tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER);
@@ -781,7 +781,7 @@ void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
bottom->height());
gfx::ImageSkia* bottom_left =
tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER);
- canvas->DrawBitmapInt(*bottom_left,
+ canvas->DrawImageInt(*bottom_left,
client_area_bounds.x() - bottom_left->width(), client_area_bottom);
gfx::ImageSkia* left = tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE);
canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
diff --git a/chrome/browser/ui/views/infobars/extension_infobar.cc b/chrome/browser/ui/views/infobars/extension_infobar.cc
index 0811dd7..edf4cef 100644
--- a/chrome/browser/ui/views/infobars/extension_infobar.cc
+++ b/chrome/browser/ui/views/infobars/extension_infobar.cc
@@ -125,10 +125,10 @@ void ExtensionInfoBar::OnImageLoaded(const gfx::Image& image,
scoped_ptr<gfx::Canvas> canvas(new gfx::Canvas(
gfx::Size(image_size + kDropArrowLeftMargin + drop_image->width(),
image_size), false));
- canvas->DrawBitmapInt(*icon, 0, 0, icon->width(), icon->height(), 0, 0,
- image_size, image_size, false);
- canvas->DrawBitmapInt(*drop_image, image_size + kDropArrowLeftMargin,
- image_size / 2);
+ canvas->DrawImageInt(*icon, 0, 0, icon->width(), icon->height(), 0, 0,
+ image_size, image_size, false);
+ canvas->DrawImageInt(*drop_image, image_size + kDropArrowLeftMargin,
+ image_size / 2);
menu_->SetIcon(canvas->ExtractBitmap());
menu_->SetVisible(true);
diff --git a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
index 686cc62..d844093 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
@@ -88,9 +88,9 @@ void KeywordHintView::OnPaint(gfx::Canvas* canvas) {
kTabButtonImage->width(),
kTabButtonImage->height());
tab_button_bounds.set_x(GetMirroredXForRect(tab_button_bounds));
- canvas->DrawBitmapInt(*kTabButtonImage,
- tab_button_bounds.x(),
- tab_button_bounds.y());
+ canvas->DrawImageInt(*kTabButtonImage,
+ tab_button_bounds.x(),
+ tab_button_bounds.y());
}
gfx::Size KeywordHintView::GetPreferredSize() {
diff --git a/chrome/browser/ui/views/tab_icon_view.cc b/chrome/browser/ui/views/tab_icon_view.cc
index 800a163..7f0e6a1 100644
--- a/chrome/browser/ui/views/tab_icon_view.cc
+++ b/chrome/browser/ui/views/tab_icon_view.cc
@@ -130,9 +130,9 @@ void TabIconView::PaintIcon(gfx::Canvas* canvas,
int dest_h = static_cast<int>(float_src_h * scale);
// Center the scaled image.
- canvas->DrawBitmapInt(image, src_x, src_y, src_w, src_h,
- (width() - dest_w) / 2, (height() - dest_h) / 2, dest_w,
- dest_h, filter);
+ canvas->DrawImageInt(image, src_x, src_y, src_w, src_h,
+ (width() - dest_w) / 2, (height() - dest_h) / 2, dest_w,
+ dest_h, filter);
}
void TabIconView::OnPaint(gfx::Canvas* canvas) {
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 34d7dca..cdbc05d 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -105,10 +105,10 @@ void DrawIconCenter(gfx::Canvas* canvas,
// NOTE: the clipping is a work around for 69528, it shouldn't be necessary.
canvas->Save();
canvas->ClipRect(gfx::Rect(dst_x, dst_y, icon_width, icon_height));
- canvas->DrawBitmapInt(image,
- image_offset, 0, icon_width, icon_height,
- dst_x, dst_y, icon_width, icon_height,
- filter);
+ canvas->DrawImageInt(image,
+ image_offset, 0, icon_width, icon_height,
+ dst_x, dst_y, icon_width, icon_height,
+ filter);
canvas->Restore();
}
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 4e0cfd1..4322314 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -551,15 +551,15 @@ void Tab::PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas) {
hover_canvas.ExtractBitmap(), background_image);
// Draw the tab background to the canvas.
- canvas->DrawBitmapInt(background_image, 0, 0);
+ canvas->DrawImageInt(background_image, 0, 0);
// And then the gradient on top of that.
if (mini_title_animation_->current_part_index() == 2) {
canvas->SaveLayerAlpha(mini_title_animation_->CurrentValueBetween(255, 0));
- canvas->DrawBitmapInt(hover_image, 0, 0);
+ canvas->DrawImageInt(hover_image, 0, 0);
canvas->Restore();
} else {
- canvas->DrawBitmapInt(hover_image, 0, 0);
+ canvas->DrawImageInt(hover_image, 0, 0);
}
}
@@ -600,7 +600,7 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
*tab_bg, offset, bg_offset_y, tab_image->l_width, height());
gfx::ImageSkia theme_l =
SkBitmapOperations::CreateMaskedBitmap(tab_l, *alpha->image_l);
- background_canvas.DrawBitmapInt(theme_l,
+ background_canvas.DrawImageInt(theme_l,
0, 0, theme_l.width(), theme_l.height() - kToolbarOverlap,
0, 0, theme_l.width(), theme_l.height() - kToolbarOverlap,
false);
@@ -611,7 +611,7 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
tab_image->r_width, height());
gfx::ImageSkia theme_r =
SkBitmapOperations::CreateMaskedBitmap(tab_r, *alpha->image_r);
- background_canvas.DrawBitmapInt(theme_r,
+ background_canvas.DrawImageInt(theme_r,
0, 0, theme_r.width(), theme_r.height() - kToolbarOverlap,
width() - theme_r.width(), 0, theme_r.width(),
theme_r.height() - kToolbarOverlap, false);
@@ -627,7 +627,7 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
width() - tab_image->l_width - tab_image->r_width,
height() - drop_shadow_height() - kToolbarOverlap - tab_image->y_offset);
- canvas->DrawBitmapInt(background_canvas.ExtractBitmap(), 0, 0);
+ canvas->DrawImageInt(background_canvas.ExtractBitmap(), 0, 0);
if (!GetThemeProvider()->HasCustomImage(tab_id) &&
hover_controller().ShouldDraw()) {
@@ -635,14 +635,14 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
}
// Now draw the highlights/shadows around the tab edge.
- canvas->DrawBitmapInt(*tab_inactive_image->image_l, 0, 0);
+ canvas->DrawImageInt(*tab_inactive_image->image_l, 0, 0);
canvas->TileImageInt(*tab_inactive_image->image_c,
tab_inactive_image->l_width, 0,
width() - tab_inactive_image->l_width -
tab_inactive_image->r_width,
height());
- canvas->DrawBitmapInt(*tab_inactive_image->image_r,
- width() - tab_inactive_image->r_width, 0);
+ canvas->DrawImageInt(*tab_inactive_image->image_r,
+ width() - tab_inactive_image->r_width, 0);
}
void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
@@ -661,14 +661,14 @@ void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
*tab_bg, offset, 0, tab_image->l_width, height());
gfx::ImageSkia theme_l =
SkBitmapOperations::CreateMaskedBitmap(tab_l, *alpha->image_l);
- canvas->DrawBitmapInt(theme_l, 0, 0);
+ canvas->DrawImageInt(theme_l, 0, 0);
// Draw right edge.
gfx::ImageSkia tab_r = SkBitmapOperations::CreateTiledBitmap(*tab_bg,
offset + width() - tab_image->r_width, 0, tab_image->r_width, height());
gfx::ImageSkia theme_r =
SkBitmapOperations::CreateMaskedBitmap(tab_r, *alpha->image_r);
- canvas->DrawBitmapInt(theme_r, width() - tab_image->r_width, 0);
+ canvas->DrawImageInt(theme_r, width() - tab_image->r_width, 0);
// Draw center. Instead of masking out the top portion we simply skip over it
// by incrementing by GetDropShadowHeight(), since it's a simple rectangle.
@@ -681,10 +681,10 @@ void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
height() - drop_shadow_height() - tab_image->y_offset);
// Now draw the highlights/shadows around the tab edge.
- canvas->DrawBitmapInt(*tab_image->image_l, 0, 0);
+ canvas->DrawImageInt(*tab_image->image_l, 0, 0);
canvas->TileImageInt(*tab_image->image_c, tab_image->l_width, 0,
width() - tab_image->l_width - tab_image->r_width, height());
- canvas->DrawBitmapInt(*tab_image->image_r, width() - tab_image->r_width, 0);
+ canvas->DrawImageInt(*tab_image->image_r, width() - tab_image->r_width, 0);
}
int Tab::IconCapacity() const {
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index dce441c..779f0fa 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -123,8 +123,8 @@ class DockView : public views::View {
case DockInfo::LEFT_HALF:
if (!rtl_ui)
std::swap(x_of_active_tab, x_of_inactive_tab);
- canvas->DrawBitmapInt(*high_icon, x_of_active_tab,
- (height() - high_icon->height()) / 2);
+ canvas->DrawImageInt(*high_icon, x_of_active_tab,
+ (height() - high_icon->height()) / 2);
if (type_ == DockInfo::LEFT_OF_WINDOW) {
DrawImageWithAlpha(canvas, *high_icon, x_of_inactive_tab,
(height() - high_icon->height()) / 2);
@@ -136,8 +136,8 @@ class DockView : public views::View {
case DockInfo::RIGHT_HALF:
if (rtl_ui)
std::swap(x_of_active_tab, x_of_inactive_tab);
- canvas->DrawBitmapInt(*high_icon, x_of_active_tab,
- (height() - high_icon->height()) / 2);
+ canvas->DrawImageInt(*high_icon, x_of_active_tab,
+ (height() - high_icon->height()) / 2);
if (type_ == DockInfo::RIGHT_OF_WINDOW) {
DrawImageWithAlpha(canvas, *high_icon, x_of_inactive_tab,
(height() - high_icon->height()) / 2);
@@ -145,21 +145,21 @@ class DockView : public views::View {
break;
case DockInfo::TOP_OF_WINDOW:
- canvas->DrawBitmapInt(*wide_icon, (width() - wide_icon->width()) / 2,
- height() / 2 - high_icon->height());
+ canvas->DrawImageInt(*wide_icon, (width() - wide_icon->width()) / 2,
+ height() / 2 - high_icon->height());
break;
case DockInfo::MAXIMIZE: {
gfx::ImageSkia* max_icon = rb.GetImageSkiaNamed(IDR_DOCK_MAX);
- canvas->DrawBitmapInt(*max_icon, (width() - max_icon->width()) / 2,
- (height() - max_icon->height()) / 2);
+ canvas->DrawImageInt(*max_icon, (width() - max_icon->width()) / 2,
+ (height() - max_icon->height()) / 2);
break;
}
case DockInfo::BOTTOM_HALF:
case DockInfo::BOTTOM_OF_WINDOW:
- canvas->DrawBitmapInt(*wide_icon, (width() - wide_icon->width()) / 2,
- height() / 2 + kTabSpacing / 2);
+ canvas->DrawImageInt(*wide_icon, (width() - wide_icon->width()) / 2,
+ height() / 2 + kTabSpacing / 2);
if (type_ == DockInfo::BOTTOM_OF_WINDOW) {
DrawImageWithAlpha(canvas, *wide_icon,
(width() - wide_icon->width()) / 2,
@@ -179,7 +179,7 @@ class DockView : public views::View {
int x, int y) {
SkPaint paint;
paint.setAlpha(128);
- canvas->DrawBitmapInt(image, x, y, paint);
+ canvas->DrawImageInt(image, x, y, paint);
}
DockInfo::Type type_;
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 610db93..951bd2e 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -354,7 +354,7 @@ void NewTabButton::OnMouseReleased(const views::MouseEvent& event) {
void NewTabButton::OnPaint(gfx::Canvas* canvas) {
SkBitmap image = GetBitmap();
- canvas->DrawBitmapInt(image, 0, height() - image.height());
+ canvas->DrawImageInt(image, 0, height() - image.height());
}
bool NewTabButton::ShouldUseNativeFrame() const {
@@ -423,14 +423,14 @@ SkBitmap NewTabButton::GetBitmapForState(
gfx::ImageSkia* overlay = GetThemeProvider()->GetImageSkiaNamed(overlay_id);
gfx::Canvas canvas(gfx::Size(overlay->width(), overlay->height()), false);
- canvas.DrawBitmapInt(GetBackgroundBitmap(state), 0, 0);
+ canvas.DrawImageInt(GetBackgroundBitmap(state), 0, 0);
// Draw the button border with a slight alpha.
const int kNativeFrameOverlayAlpha = 178;
const int kOpaqueFrameOverlayAlpha = 230;
canvas.SaveLayerAlpha(ShouldUseNativeFrame() ?
kNativeFrameOverlayAlpha : kOpaqueFrameOverlayAlpha);
- canvas.DrawBitmapInt(*overlay, 0, 0);
+ canvas.DrawImageInt(*overlay, 0, 0);
canvas.Restore();
return canvas.ExtractBitmap();
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index b53dab9..2f12389 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -330,7 +330,7 @@ gfx::ImageSkia ToolbarView::GetAppMenuIcon(
NOTREACHED();
}
- canvas->DrawBitmapInt(badge, icon.width() - badge.width(), kBadgeTopMargin);
+ canvas->DrawImageInt(badge, icon.width() - badge.width(), kBadgeTopMargin);
return canvas->ExtractBitmap();
}
@@ -655,9 +655,9 @@ void ToolbarView::OnPaint(gfx::Canvas* canvas) {
// when they're flush against the edge of the screen they just look glitchy.
if (!browser_->window() || !browser_->window()->IsMaximized()) {
int top_spacing = PopupTopSpacing();
- canvas->DrawBitmapInt(*kPopupBackgroundEdge, 0, top_spacing);
- canvas->DrawBitmapInt(*kPopupBackgroundEdge,
- width() - kPopupBackgroundEdge->width(), top_spacing);
+ canvas->DrawImageInt(*kPopupBackgroundEdge, 0, top_spacing);
+ canvas->DrawImageInt(*kPopupBackgroundEdge,
+ width() - kPopupBackgroundEdge->width(), top_spacing);
}
// For glass, we need to draw a black line below the location bar to separate
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index df4118a..a43d6b8 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -59,7 +59,7 @@ SkBitmap GetGAIAPictureForNTP(const gfx::Image& image) {
skia::ImageOperations::RESIZE_BEST, kLength, kLength);
gfx::Canvas canvas(gfx::Size(kLength, kLength), false);
- canvas.DrawBitmapInt(bmp, 0, 0);
+ canvas.DrawImageInt(bmp, 0, 0);
// Draw a gray border on the inside of the icon.
SkColor color = SkColorSetARGB(83, 0, 0, 0);
diff --git a/chrome/common/badge_util.cc b/chrome/common/badge_util.cc
index 0c7478e..3859a72 100644
--- a/chrome/common/badge_util.cc
+++ b/chrome/common/badge_util.cc
@@ -86,7 +86,7 @@ SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon,
// Render the badge bitmap and overlay into a canvas.
scoped_ptr<gfx::Canvas> canvas(
new gfx::Canvas(gfx::Size(badge_width, icon.height()), false));
- canvas->DrawBitmapInt(icon, 0, 0);
+ canvas->DrawImageInt(icon, 0, 0);
// Draw the text overlay centered horizontally and vertically. Skia expects
// us to specify the lower left coordinate of the text box, which is why we
diff --git a/ui/base/dragdrop/drag_utils.cc b/ui/base/dragdrop/drag_utils.cc
index 9e1bad51..8aee787 100644
--- a/ui/base/dragdrop/drag_utils.cc
+++ b/ui/base/dragdrop/drag_utils.cc
@@ -41,7 +41,7 @@ void CreateDragImageForFile(const FilePath& file_name,
gfx::Canvas canvas(gfx::Size(width, height), false /* translucent */);
// Paint the icon.
- canvas.DrawBitmapInt(*icon, (width - icon->width()) / 2, 0);
+ canvas.DrawImageInt(*icon, (width - icon->width()) / 2, 0);
string16 name = file_name.BaseName().LossyDisplayName();
const int flags = gfx::Canvas::TEXT_ALIGN_CENTER;
diff --git a/ui/base/native_theme/native_theme_android.cc b/ui/base/native_theme/native_theme_android.cc
index 7025e8f..354bd0f 100644
--- a/ui/base/native_theme/native_theme_android.cc
+++ b/ui/base/native_theme/native_theme_android.cc
@@ -295,7 +295,7 @@ void NativeThemeAndroid::PaintCheckbox(SkCanvas* canvas,
}
gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height()));
- DrawBitmapInt(canvas, *image, 0, 0, image->width(), image->height(),
+ DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(),
bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
@@ -316,7 +316,7 @@ void NativeThemeAndroid::PaintRadio(SkCanvas* canvas,
}
gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height()));
- DrawBitmapInt(canvas, *image, 0, 0, image->width(), image->height(),
+ DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(),
bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
@@ -631,14 +631,14 @@ void NativeThemeAndroid::PaintProgressBar(
int dest_left_border_width = static_cast<int>(left_border_image->width() *
tile_scale);
- DrawBitmapInt(canvas, *left_border_image, 0, 0, left_border_image->width(),
+ DrawImageInt(canvas, *left_border_image, 0, 0, left_border_image->width(),
left_border_image->height(), rect.x(), rect.y(), dest_left_border_width,
rect.height());
int dest_right_border_width = static_cast<int>(right_border_image->width() *
tile_scale);
int dest_x = rect.right() - dest_right_border_width;
- DrawBitmapInt(canvas, *right_border_image, 0, 0, right_border_image->width(),
+ DrawImageInt(canvas, *right_border_image, 0, 0, right_border_image->width(),
right_border_image->height(), dest_x, rect.y(), dest_right_border_width,
rect.height());
}
@@ -654,7 +654,7 @@ bool NativeThemeAndroid::IntersectsClipRectInt(SkCanvas* canvas,
SkIntToScalar(y + h));
}
-void NativeThemeAndroid::DrawBitmapInt(SkCanvas* canvas,
+void NativeThemeAndroid::DrawImageInt(SkCanvas* canvas,
const gfx::ImageSkia& image,
int src_x,
int src_y,
@@ -664,7 +664,7 @@ void NativeThemeAndroid::DrawBitmapInt(SkCanvas* canvas,
int dest_y,
int dest_w,
int dest_h) const {
- gfx::Canvas(canvas).DrawBitmapInt(image, src_x, src_y, src_w, src_h,
+ gfx::Canvas(canvas).DrawImageInt(image, src_x, src_y, src_w, src_h,
dest_x, dest_y, dest_w, dest_h, true);
}
diff --git a/ui/base/native_theme/native_theme_android.h b/ui/base/native_theme/native_theme_android.h
index 04c7be3..8320f51 100644
--- a/ui/base/native_theme/native_theme_android.h
+++ b/ui/base/native_theme/native_theme_android.h
@@ -115,16 +115,16 @@ class NativeThemeAndroid : public NativeTheme {
// Draw the dest rectangle with the given image which might be scaled if its
// size is not same as target rectangle.
- void DrawBitmapInt(SkCanvas* canvas,
- const gfx::ImageSkia& image,
- int src_x,
- int src_y,
- int src_w,
- int src_h,
- int dest_x,
- int dest_y,
- int dest_w,
- int dest_h) const;
+ void DrawImageInt(SkCanvas* canvas,
+ const gfx::ImageSkia& image,
+ int src_x,
+ int src_y,
+ int src_w,
+ int src_h,
+ int dest_x,
+ int dest_y,
+ int dest_w,
+ int dest_h) const;
// Draw the target rectangle with the |bitmap| accroding the given
// |tile_scale_x| and |tile_scale_y|
diff --git a/ui/base/native_theme/native_theme_base.cc b/ui/base/native_theme/native_theme_base.cc
index 7a446fa..c2b9f5d 100644
--- a/ui/base/native_theme/native_theme_base.cc
+++ b/ui/base/native_theme/native_theme_base.cc
@@ -461,7 +461,7 @@ void NativeThemeBase::PaintCheckbox(SkCanvas* canvas,
}
gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height()));
- DrawBitmapInt(canvas, *image, 0, 0, image->width(), image->height(),
+ DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(),
bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
@@ -482,7 +482,7 @@ void NativeThemeBase::PaintRadio(SkCanvas* canvas,
}
gfx::Rect bounds = rect.Center(gfx::Size(image->width(), image->height()));
- DrawBitmapInt(canvas, *image, 0, 0, image->width(), image->height(),
+ DrawImageInt(canvas, *image, 0, 0, image->width(), image->height(),
bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
@@ -796,16 +796,16 @@ void NativeThemeBase::PaintProgressBar(SkCanvas* canvas,
int dest_left_border_width = static_cast<int>(left_border_image->width() *
tile_scale);
- DrawBitmapInt(canvas, *left_border_image, 0, 0, left_border_image->width(),
+ DrawImageInt(canvas, *left_border_image, 0, 0, left_border_image->width(),
left_border_image->height(), rect.x(), rect.y(), dest_left_border_width,
rect.height());
int dest_right_border_width = static_cast<int>(right_border_image->width() *
tile_scale);
int dest_x = rect.right() - dest_right_border_width;
- DrawBitmapInt(canvas, *right_border_image, 0, 0, right_border_image->width(),
- right_border_image->height(), dest_x, rect.y(),
- dest_right_border_width, rect.height());
+ DrawImageInt(canvas, *right_border_image, 0, 0, right_border_image->width(),
+ right_border_image->height(), dest_x, rect.y(),
+ dest_right_border_width, rect.height());
}
bool NativeThemeBase::IntersectsClipRectInt(SkCanvas* canvas,
@@ -816,11 +816,11 @@ bool NativeThemeBase::IntersectsClipRectInt(SkCanvas* canvas,
SkIntToScalar(y + h));
}
-void NativeThemeBase::DrawBitmapInt(
+void NativeThemeBase::DrawImageInt(
SkCanvas* canvas, const gfx::ImageSkia& image,
int src_x, int src_y, int src_w, int src_h,
int dest_x, int dest_y, int dest_w, int dest_h) const {
- gfx::Canvas(canvas).DrawBitmapInt(image, src_x, src_y, src_w, src_h,
+ gfx::Canvas(canvas).DrawImageInt(image, src_x, src_y, src_w, src_h,
dest_x, dest_y, dest_w, dest_h, true);
}
diff --git a/ui/base/native_theme/native_theme_base.h b/ui/base/native_theme/native_theme_base.h
index 5e6096e..92991b5 100644
--- a/ui/base/native_theme/native_theme_base.h
+++ b/ui/base/native_theme/native_theme_base.h
@@ -128,9 +128,9 @@ class NativeThemeBase : public NativeTheme {
bool IntersectsClipRectInt(SkCanvas* canvas,
int x, int y, int w, int h) const;
- void DrawBitmapInt(SkCanvas* canvas, const gfx::ImageSkia& image,
- int src_x, int src_y, int src_w, int src_h,
- int dest_x, int dest_y, int dest_w, int dest_h) const;
+ void DrawImageInt(SkCanvas* canvas, const gfx::ImageSkia& image,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h) const;
void DrawTiledImage(SkCanvas* canvas,
const gfx::ImageSkia& image,
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index f3419fc..5dbb00e 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -38,7 +38,7 @@ Canvas::Canvas(const SkBitmap& bitmap, bool is_opaque)
: owned_canvas_(new skia::PlatformCanvas(bitmap.width(), bitmap.height(),
is_opaque)),
canvas_(owned_canvas_.get()) {
- DrawBitmapInt(bitmap, 0, 0);
+ DrawImageInt(bitmap, 0, 0);
}
Canvas::Canvas()
@@ -253,14 +253,14 @@ void Canvas::DrawFocusRect(const gfx::Rect& rect) {
DrawDashedRect(rect, SK_ColorGRAY);
}
-void Canvas::DrawBitmapInt(const gfx::ImageSkia& image, int x, int y) {
+void Canvas::DrawImageInt(const gfx::ImageSkia& image, int x, int y) {
SkPaint paint;
- DrawBitmapInt(image, x, y, paint);
+ DrawImageInt(image, x, y, paint);
}
-void Canvas::DrawBitmapInt(const gfx::ImageSkia& image,
- int x, int y,
- const SkPaint& paint) {
+void Canvas::DrawImageInt(const gfx::ImageSkia& image,
+ int x, int y,
+ const SkPaint& paint) {
float bitmap_scale;
const SkBitmap& bitmap = GetBitmapToPaint(image, &bitmap_scale);
if (bitmap.isNull())
@@ -276,20 +276,20 @@ void Canvas::DrawBitmapInt(const gfx::ImageSkia& image,
canvas_->restore();
}
-void Canvas::DrawBitmapInt(const gfx::ImageSkia& image,
- int src_x, int src_y, int src_w, int src_h,
- int dest_x, int dest_y, int dest_w, int dest_h,
- bool filter) {
+void Canvas::DrawImageInt(const gfx::ImageSkia& image,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter) {
SkPaint p;
- DrawBitmapInt(image, src_x, src_y, src_w, src_h, dest_x, dest_y,
- dest_w, dest_h, filter, p);
+ DrawImageInt(image, src_x, src_y, src_w, src_h, dest_x, dest_y,
+ dest_w, dest_h, filter, p);
}
-void Canvas::DrawBitmapInt(const gfx::ImageSkia& image,
- int src_x, int src_y, int src_w, int src_h,
- int dest_x, int dest_y, int dest_w, int dest_h,
- bool filter,
- const SkPaint& paint) {
+void Canvas::DrawImageInt(const gfx::ImageSkia& image,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter,
+ const SkPaint& paint) {
DLOG_ASSERT(src_x + src_w < std::numeric_limits<int16_t>::max() &&
src_y + src_h < std::numeric_limits<int16_t>::max());
if (src_w <= 0 || src_h <= 0) {
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 5c7bb9f..6780774 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -245,16 +245,16 @@ class UI_EXPORT Canvas {
// corner of the bitmap is rendered at the specified location.
// Parameters are specified relative to current canvas scale not in pixels.
// Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1.
- void DrawBitmapInt(const gfx::ImageSkia&, int x, int y);
+ void DrawImageInt(const gfx::ImageSkia&, int x, int y);
// Draws an image with the origin at the specified location, using the
// specified paint. The upper left corner of the bitmap is rendered at the
// specified location.
// Parameters are specified relative to current canvas scale not in pixels.
// Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1.
- void DrawBitmapInt(const gfx::ImageSkia& image,
- int x, int y,
- const SkPaint& paint);
+ void DrawImageInt(const gfx::ImageSkia& image,
+ int x, int y,
+ const SkPaint& paint);
// Draws a portion of an image in the specified location. The src parameters
// correspond to the region of the bitmap to draw in the region defined
@@ -268,15 +268,15 @@ class UI_EXPORT Canvas {
// An optional custom SkPaint can be provided.
// Parameters are specified relative to current canvas scale not in pixels.
// Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1.
- void DrawBitmapInt(const gfx::ImageSkia& image,
- int src_x, int src_y, int src_w, int src_h,
- int dest_x, int dest_y, int dest_w, int dest_h,
- bool filter);
- void DrawBitmapInt(const gfx::ImageSkia& image,
- int src_x, int src_y, int src_w, int src_h,
- int dest_x, int dest_y, int dest_w, int dest_h,
- bool filter,
- const SkPaint& paint);
+ void DrawImageInt(const gfx::ImageSkia& image,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter);
+ void DrawImageInt(const gfx::ImageSkia& image,
+ int src_x, int src_y, int src_w, int src_h,
+ int dest_x, int dest_y, int dest_w, int dest_h,
+ bool filter,
+ const SkPaint& paint);
// Draws text with the specified color, font and location. The text is
// aligned to the left, vertically centered, clipped to the region. If the
diff --git a/ui/gfx/canvas_linux.cc b/ui/gfx/canvas_linux.cc
index 576eed2..9d417c9 100644
--- a/ui/gfx/canvas_linux.cc
+++ b/ui/gfx/canvas_linux.cc
@@ -157,7 +157,7 @@ void DrawStringContext::DrawWithHalo(SkColor text_color,
const SkBitmap& text_bitmap = const_cast<SkBitmap&>(
skia::GetTopDevice(*text_canvas.sk_canvas())->accessBitmap(false));
- canvas_->DrawBitmapInt(text_bitmap, text_rect_.x() - 1, text_rect_.y() - 1);
+ canvas_->DrawImageInt(text_bitmap, text_rect_.x() - 1, text_rect_.y() - 1);
}
void DrawStringContext::DrawUnderline(cairo_t* cr, double extra_edge_width) {
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 5c51481..003b2d1 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -396,7 +396,7 @@ void Canvas::DrawStringWithHalo(const string16& text,
}
// Draw the halo bitmap with blur.
- DrawBitmapInt(text_bitmap, x - 1, y - 1);
+ DrawImageInt(text_bitmap, x - 1, y - 1);
}
// TODO(asvitkine): Remove the ifdef once all platforms use canvas_skia.cc.
diff --git a/ui/gfx/canvas_win.cc b/ui/gfx/canvas_win.cc
index 6e1249a..f38dccc 100644
--- a/ui/gfx/canvas_win.cc
+++ b/ui/gfx/canvas_win.cc
@@ -455,7 +455,7 @@ void Canvas::DrawStringWithHalo(const string16& text,
}
// Draw the halo bitmap with blur.
- DrawBitmapInt(text_bitmap, x - 1, y - 1);
+ DrawImageInt(text_bitmap, x - 1, y - 1);
}
void Canvas::DrawFadeTruncatingString(
diff --git a/ui/views/bubble/bubble_border.cc b/ui/views/bubble/bubble_border.cc
index 6f550d5..3b4f03d 100644
--- a/ui/views/bubble/bubble_border.cc
+++ b/ui/views/bubble/bubble_border.cc
@@ -324,7 +324,7 @@ void BubbleBorder::Paint(const views::View& view, gfx::Canvas* canvas) const {
}
// Top left corner.
- canvas->DrawBitmapInt(*images_->top_left, left, top);
+ canvas->DrawImageInt(*images_->top_left, left, top);
// Top edge.
if (arrow_location_ == TOP_LEFT || arrow_location_ == TOP_RIGHT) {
@@ -353,7 +353,7 @@ void BubbleBorder::Paint(const views::View& view, gfx::Canvas* canvas) const {
}
// Top right corner.
- canvas->DrawBitmapInt(*images_->top_right, right - tr_width, top);
+ canvas->DrawImageInt(*images_->top_right, right - tr_width, top);
// Right edge.
if (arrow_location_ == RIGHT_TOP || arrow_location_ == RIGHT_BOTTOM) {
@@ -384,9 +384,9 @@ void BubbleBorder::Paint(const views::View& view, gfx::Canvas* canvas) const {
}
// Bottom right corner.
- canvas->DrawBitmapInt(*images_->bottom_right,
- right - br_width,
- bottom - br_height);
+ canvas->DrawImageInt(*images_->bottom_right,
+ right - br_width,
+ bottom - br_height);
// Bottom edge.
if (arrow_location_ == BOTTOM_LEFT || arrow_location_ == BOTTOM_RIGHT) {
@@ -417,7 +417,7 @@ void BubbleBorder::Paint(const views::View& view, gfx::Canvas* canvas) const {
}
// Bottom left corner.
- canvas->DrawBitmapInt(*images_->bottom_left, left, bottom - bl_height);
+ canvas->DrawImageInt(*images_->bottom_left, left, bottom - bl_height);
}
void BubbleBorder::DrawEdgeWithArrow(gfx::Canvas* canvas,
@@ -446,7 +446,7 @@ void BubbleBorder::DrawEdgeWithArrow(gfx::Canvas* canvas,
is_horizontal ? edge->height() : before_arrow);
}
- canvas->DrawBitmapInt(*arrow,
+ canvas->DrawImageInt(*arrow,
start_x + (is_horizontal ? before_arrow : offset),
start_y + (is_horizontal ? offset : before_arrow));
diff --git a/ui/views/controls/button/image_button.cc b/ui/views/controls/button/image_button.cc
index 729e848..a9d15fc 100644
--- a/ui/views/controls/button/image_button.cc
+++ b/ui/views/controls/button/image_button.cc
@@ -92,12 +92,12 @@ void ImageButton::OnPaint(gfx::Canvas* canvas) {
y = height() - img.height();
if (!background_image_.empty())
- canvas->DrawBitmapInt(background_image_, x, y);
+ canvas->DrawImageInt(background_image_, x, y);
- canvas->DrawBitmapInt(img, x, y);
+ canvas->DrawImageInt(img, x, y);
if (!overlay_image_.empty())
- canvas->DrawBitmapInt(overlay_image_, x, y);
+ canvas->DrawImageInt(overlay_image_, x, y);
}
OnPaintFocusBorder(canvas);
}
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index a9aeb5b..156480c 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -153,7 +153,7 @@ void MenuButton::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
menu_marker_->width(),
menu_marker_->height());
arrow_bounds.set_x(GetMirroredXForRect(arrow_bounds));
- canvas->DrawBitmapInt(*menu_marker_, arrow_bounds.x(), arrow_bounds.y());
+ canvas->DrawImageInt(*menu_marker_, arrow_bounds.x(), arrow_bounds.y());
}
}
diff --git a/ui/views/controls/button/text_button.cc b/ui/views/controls/button/text_button.cc
index bb3aa59..bfa45e7 100644
--- a/ui/views/controls/button/text_button.cc
+++ b/ui/views/controls/button/text_button.cc
@@ -166,24 +166,24 @@ void TextButtonBorder::Paint(const View& view,
int br_width = set.bottom_right->width();
int br_height = set.bottom_right->height();
- canvas->DrawBitmapInt(*set.top_left, 0, 0);
- canvas->DrawBitmapInt(*set.top, 0, 0, set.top->width(), t_height, tl_width, 0,
+ canvas->DrawImageInt(*set.top_left, 0, 0);
+ canvas->DrawImageInt(*set.top, 0, 0, set.top->width(), t_height, tl_width, 0,
width - tl_width - set.top_right->width(), t_height, false);
- canvas->DrawBitmapInt(*set.top_right, width - set.top_right->width(), 0);
- canvas->DrawBitmapInt(*set.left, 0, 0, l_width, set.left->height(), 0,
+ canvas->DrawImageInt(*set.top_right, width - set.top_right->width(), 0);
+ canvas->DrawImageInt(*set.left, 0, 0, l_width, set.left->height(), 0,
tl_height, tl_width, height - tl_height - bl_height, false);
- canvas->DrawBitmapInt(*set.center, 0, 0, set.center->width(),
+ canvas->DrawImageInt(*set.center, 0, 0, set.center->width(),
set.center->height(), l_width, t_height, width - l_width - r_width,
height - t_height - b_height, false);
- canvas->DrawBitmapInt(*set.right, 0, 0, r_width, set.right->height(),
- width - r_width, tr_height, r_width,
- height - tr_height - br_height, false);
- canvas->DrawBitmapInt(*set.bottom_left, 0, height - bl_height);
- canvas->DrawBitmapInt(*set.bottom, 0, 0, set.bottom->width(), b_height,
- bl_width, height - b_height,
- width - bl_width - br_width, b_height, false);
- canvas->DrawBitmapInt(*set.bottom_right, width - br_width,
- height - br_height);
+ canvas->DrawImageInt(*set.right, 0, 0, r_width, set.right->height(),
+ width - r_width, tr_height, r_width,
+ height - tr_height - br_height, false);
+ canvas->DrawImageInt(*set.bottom_left, 0, height - bl_height);
+ canvas->DrawImageInt(*set.bottom, 0, 0, set.bottom->width(), b_height,
+ bl_width, height - b_height,
+ width - bl_width - br_width, b_height, false);
+ canvas->DrawImageInt(*set.bottom_right, width - br_width,
+ height - br_height);
}
void TextButtonBorder::GetInsets(gfx::Insets* insets) const {
@@ -744,7 +744,7 @@ void TextButton::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// Mirroring the icon position if necessary.
gfx::Rect icon_bounds(icon_x, icon_y, icon.width(), icon.height());
icon_bounds.set_x(GetMirroredXForRect(icon_bounds));
- canvas->DrawBitmapInt(icon, icon_bounds.x(), icon_bounds.y());
+ canvas->DrawImageInt(icon, icon_bounds.x(), icon_bounds.y());
}
}
diff --git a/ui/views/controls/combobox/native_combobox_views.cc b/ui/views/controls/combobox/native_combobox_views.cc
index 4bd17a3..fa5ee44 100644
--- a/ui/views/controls/combobox/native_combobox_views.cc
+++ b/ui/views/controls/combobox/native_combobox_views.cc
@@ -301,7 +301,7 @@ void NativeComboboxViews::PaintText(gfx::Canvas* canvas) {
disclosure_arrow_->width(),
disclosure_arrow_->height());
AdjustBoundsForRTLUI(&arrow_bounds);
- canvas->DrawBitmapInt(*disclosure_arrow_, arrow_bounds.x(), arrow_bounds.y());
+ canvas->DrawImageInt(*disclosure_arrow_, arrow_bounds.x(), arrow_bounds.y());
canvas->Restore();
}
diff --git a/ui/views/controls/glow_hover_controller.cc b/ui/views/controls/glow_hover_controller.cc
index f3b356b..88aee71 100644
--- a/ui/views/controls/glow_hover_controller.cc
+++ b/ui/views/controls/glow_hover_controller.cc
@@ -98,8 +98,8 @@ void GlowHoverController::Draw(gfx::Canvas* canvas,
}
gfx::ImageSkia result = SkBitmapOperations::CreateMaskedBitmap(
hover_canvas.ExtractBitmap(), mask_image);
- canvas->DrawBitmapInt(result, (view_->width() - mask_image.width()) / 2,
- (view_->height() - mask_image.height()) / 2);
+ canvas->DrawImageInt(result, (view_->width() - mask_image.width()) / 2,
+ (view_->height() - mask_image.height()) / 2);
}
void GlowHoverController::AnimationEnded(const ui::Animation* animation) {
diff --git a/ui/views/controls/image_view.cc b/ui/views/controls/image_view.cc
index bf8043d..ea63a6d 100644
--- a/ui/views/controls/image_view.cc
+++ b/ui/views/controls/image_view.cc
@@ -121,11 +121,11 @@ void ImageView::OnPaint(gfx::Canvas* canvas) {
// Resize case
SkPaint paint;
paint.setFilterBitmap(true);
- canvas->DrawBitmapInt(image_, 0, 0, image_.width(), image_.height(),
+ canvas->DrawImageInt(image_, 0, 0, image_.width(), image_.height(),
image_bounds.x(), image_bounds.y(), image_bounds.width(),
image_bounds.height(), true, paint);
} else {
- canvas->DrawBitmapInt(image_, image_bounds.x(), image_bounds.y());
+ canvas->DrawImageInt(image_, image_bounds.x(), image_bounds.y());
}
}
diff --git a/ui/views/controls/menu/menu_image_util.cc b/ui/views/controls/menu/menu_image_util.cc
index d5a8be2..bac396b 100644
--- a/ui/views/controls/menu/menu_image_util.cc
+++ b/ui/views/controls/menu/menu_image_util.cc
@@ -89,7 +89,7 @@ gfx::ImageSkia* GetRtlSubmenuArrowImage() {
const gfx::ImageSkia* r = rb.GetImageNamed(IDR_MENU_ARROW).ToImageSkia();
gfx::Canvas canvas(gfx::Size(r->width(), r->height()), false);
canvas.Scale(-1, 1);
- canvas.DrawBitmapInt(*r, - r->width(), 0);
+ canvas.DrawImageInt(*r, - r->width(), 0);
kRtlArrow = new gfx::ImageSkia(canvas.ExtractBitmap());
}
return kRtlArrow;
diff --git a/ui/views/controls/menu/menu_item_view_views.cc b/ui/views/controls/menu/menu_item_view_views.cc
index 1ed2bd8..720c24e 100644
--- a/ui/views/controls/menu/menu_item_view_views.cc
+++ b/ui/views/controls/menu/menu_item_view_views.cc
@@ -50,7 +50,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
// Don't use config.check_width here as it's padded to force more padding.
gfx::Rect check_bounds(icon_x, icon_y, check->width(), icon_height);
AdjustBoundsForRTLUI(&check_bounds);
- canvas->DrawBitmapInt(*check, check_bounds.x(), check_bounds.y());
+ canvas->DrawImageInt(*check, check_bounds.x(), check_bounds.y());
} else if (type_ == RADIO) {
const gfx::ImageSkia* image =
GetRadioButtonImage(GetDelegate()->IsItemChecked(GetCommand()));
@@ -61,7 +61,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
image->width(),
image->height());
AdjustBoundsForRTLUI(&radio_bounds);
- canvas->DrawBitmapInt(*image, radio_bounds.x(), radio_bounds.y());
+ canvas->DrawImageInt(*image, radio_bounds.x(), radio_bounds.y());
}
// Render the foreground.
@@ -96,9 +96,9 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
if (!enabled()) {
SkPaint paint;
paint.setAlpha(120);
- canvas->DrawBitmapInt(icon_, icon_bounds.x(), icon_bounds.y(), paint);
+ canvas->DrawImageInt(icon_, icon_bounds.x(), icon_bounds.y(), paint);
} else {
- canvas->DrawBitmapInt(icon_, icon_bounds.x(), icon_bounds.y());
+ canvas->DrawImageInt(icon_, icon_bounds.x(), icon_bounds.y());
}
}
@@ -110,8 +110,8 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
config.arrow_width) / 2,
config.arrow_width, height());
AdjustBoundsForRTLUI(&arrow_bounds);
- canvas->DrawBitmapInt(*GetSubmenuArrowImage(),
- arrow_bounds.x(), arrow_bounds.y());
+ canvas->DrawImageInt(*GetSubmenuArrowImage(),
+ arrow_bounds.x(), arrow_bounds.y());
}
}
diff --git a/ui/views/controls/menu/menu_item_view_win.cc b/ui/views/controls/menu/menu_item_view_win.cc
index bca528a..6f9063a 100644
--- a/ui/views/controls/menu/menu_item_view_win.cc
+++ b/ui/views/controls/menu/menu_item_view_win.cc
@@ -111,7 +111,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
icon_.width(),
icon_.height());
icon_bounds.set_x(GetMirroredXForRect(icon_bounds));
- canvas->DrawBitmapInt(icon_, icon_bounds.x(), icon_bounds.y());
+ canvas->DrawImageInt(icon_, icon_bounds.x(), icon_bounds.y());
}
if (HasSubmenu()) {
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
index 6caaac0..fbd2835 100644
--- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -118,19 +118,19 @@ class BitmapScrollBarThumb : public BaseScrollBarThumb {
protected:
// View overrides:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
- canvas->DrawBitmapInt(*start_cap_image(), 0, 0);
+ canvas->DrawImageInt(*start_cap_image(), 0, 0);
int top_cap_height = start_cap_image()->height();
int bottom_cap_height = end_cap_image()->height();
int thumb_body_height = height() - top_cap_height - bottom_cap_height;
canvas->TileImageInt(*background_image(), 0, top_cap_height,
background_image()->width(), thumb_body_height);
- canvas->DrawBitmapInt(*end_cap_image(), 0,
- height() - bottom_cap_height);
+ canvas->DrawImageInt(*end_cap_image(), 0,
+ height() - bottom_cap_height);
// Paint the grippy over the track.
int grippy_x = (width() - grippy_image()->width()) / 2;
int grippy_y = (thumb_body_height - grippy_image()->height()) / 2;
- canvas->DrawBitmapInt(*grippy_image(), grippy_x, grippy_y);
+ canvas->DrawImageInt(*grippy_image(), grippy_x, grippy_y);
}
private:
diff --git a/ui/views/controls/table/table_view_views.cc b/ui/views/controls/table/table_view_views.cc
index bc27412..b740ac8 100644
--- a/ui/views/controls/table/table_view_views.cc
+++ b/ui/views/controls/table/table_view_views.cc
@@ -252,7 +252,7 @@ void TableView::OnPaint(gfx::Canvas* canvas) {
gfx::ImageSkia image = model_->GetIcon(i);
if (!image.isNull()) {
int image_x = GetMirroredXWithWidthInView(text_x, image.width());
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image, 0, 0, image.width(), image.height(),
image_x, row_bounds.y() + (row_bounds.height() - kImageSize) / 2,
kImageSize, kImageSize, true);
diff --git a/ui/views/controls/table/table_view_win.cc b/ui/views/controls/table/table_view_win.cc
index 5ed8725..e9b8765 100644
--- a/ui/views/controls/table/table_view_win.cc
+++ b/ui/views/controls/table/table_view_win.cc
@@ -1264,7 +1264,7 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
SkXfermode::kSrc_Mode);
// + 1 for padding (we declared the image as 18x18 in the list-
// view when they are 16x16 so we get an extra pixel of padding).
- canvas.DrawBitmapInt(image, 0, 0,
+ canvas.DrawImageInt(image, 0, 0,
image.width(), image.height(),
1, 1,
gfx::kFaviconSize, gfx::kFaviconSize, true);
diff --git a/ui/views/controls/throbber.cc b/ui/views/controls/throbber.cc
index 831d0d9..9cb6e40 100644
--- a/ui/views/controls/throbber.cc
+++ b/ui/views/controls/throbber.cc
@@ -83,10 +83,10 @@ void Throbber::OnPaint(gfx::Canvas* canvas) {
int image_size = frames_->height();
int image_offset = current_frame * image_size;
- canvas->DrawBitmapInt(*frames_,
- image_offset, 0, image_size, image_size,
- 0, 0, image_size, image_size,
- false);
+ canvas->DrawImageInt(*frames_,
+ image_offset, 0, image_size, image_size,
+ 0, 0, image_size, image_size,
+ false);
}
@@ -162,7 +162,7 @@ void CheckmarkThrobber::OnPaint(gfx::Canvas* canvas) {
if (checked_) {
int checkmark_x = (width() - checkmark_->width()) / 2;
int checkmark_y = (height() - checkmark_->height()) / 2;
- canvas->DrawBitmapInt(*checkmark_, checkmark_x, checkmark_y);
+ canvas->DrawImageInt(*checkmark_, checkmark_x, checkmark_y);
}
}
diff --git a/ui/views/controls/tree/tree_view_views.cc b/ui/views/controls/tree/tree_view_views.cc
index 3e84dd9..b13080e 100644
--- a/ui/views/controls/tree/tree_view_views.cc
+++ b/ui/views/controls/tree/tree_view_views.cc
@@ -653,7 +653,7 @@ void TreeView::PaintRow(gfx::Canvas* canvas,
icon_x = bounds.right() - icon_x - open_icon_.width();
else
icon_x += bounds.x();
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
icon, icon_x,
bounds.y() + (bounds.height() - icon.height()) / 2);
diff --git a/ui/views/controls/tree/tree_view_win.cc b/ui/views/controls/tree/tree_view_win.cc
index 3f982fc..5a81519 100644
--- a/ui/views/controls/tree/tree_view_win.cc
+++ b/ui/views/controls/tree/tree_view_win.cc
@@ -696,7 +696,7 @@ HIMAGELIST TreeView::CreateImageList() {
// Draw our icons into this canvas.
int height_offset = (height - model_images[i].height()) / 2;
int width_offset = (width - model_images[i].width()) / 2;
- canvas.DrawBitmapInt(model_images[i], width_offset, height_offset);
+ canvas.DrawImageInt(model_images[i], width_offset, height_offset);
model_icon = IconUtil::CreateHICONFromSkBitmap(canvas.ExtractBitmap());
} else {
model_icon = IconUtil::CreateHICONFromSkBitmap(model_images[i]);
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index e790888..96d063d 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -75,32 +75,32 @@ class ImagePainter : public Painter {
virtual void Paint(gfx::Canvas* canvas, const gfx::Size& size) OVERRIDE {
if (size.width() == image_.width() && size.height() == image_.height()) {
// Early out if the size we're to render at equals the size of the image.
- canvas->DrawBitmapInt(image_, 0, 0);
+ canvas->DrawImageInt(image_, 0, 0);
return;
}
// Upper left.
- canvas->DrawBitmapInt(image_, 0, 0, insets_.left(), insets_.top(),
- 0, 0, insets_.left(), insets_.top(), true);
+ canvas->DrawImageInt(image_, 0, 0, insets_.left(), insets_.top(),
+ 0, 0, insets_.left(), insets_.top(), true);
// Top edge.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
insets_.left(), 0, image_.width() - insets_.width(), insets_.top(),
insets_.left(), 0, size.width() - insets_.width(), insets_.top(), true);
// Upper right.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
image_.width() - insets_.right(), 0, insets_.right(), insets_.top(),
size.width() - insets_.right(), 0, insets_.right(), insets_.top(),
true);
// Right edge.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
image_.width() - insets_.right(), insets_.top(),
insets_.right(), image_.height() - insets_.height(),
size.width() - insets_.right(), insets_.top(), insets_.right(),
size.height() - insets_.height(), true);
// Bottom right.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
image_.width() - insets_.right(), image_.height() - insets_.bottom(),
insets_.right(), insets_.bottom(),
@@ -108,7 +108,7 @@ class ImagePainter : public Painter {
size.height() - insets_.bottom(), insets_.right(),
insets_.bottom(), true);
// Bottom edge.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
insets_.left(), image_.height() - insets_.bottom(),
image_.width() - insets_.width(), insets_.bottom(),
@@ -116,21 +116,21 @@ class ImagePainter : public Painter {
size.width() - insets_.width(),
insets_.bottom(), true);
// Bottom left.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
0, image_.height() - insets_.bottom(), insets_.left(),
insets_.bottom(),
0, size.height() - insets_.bottom(), insets_.left(), insets_.bottom(),
true);
// Left.
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
0, insets_.top(), insets_.left(), image_.height() - insets_.height(),
0, insets_.top(), insets_.left(), size.height() - insets_.height(),
true);
// Center.
if (paint_center_) {
- canvas->DrawBitmapInt(
+ canvas->DrawImageInt(
image_,
insets_.left(), insets_.top(),
image_.width() - insets_.width(), image_.height() - insets_.height(),
@@ -193,9 +193,9 @@ void HorizontalPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
// No room to paint.
return;
}
- canvas->DrawBitmapInt(*images_[LEFT], 0, 0);
- canvas->DrawBitmapInt(*images_[RIGHT],
- size.width() - images_[RIGHT]->width(), 0);
+ canvas->DrawImageInt(*images_[LEFT], 0, 0);
+ canvas->DrawImageInt(*images_[RIGHT],
+ size.width() - images_[RIGHT]->width(), 0);
canvas->TileImageInt(*images_[CENTER], images_[LEFT]->width(), 0,
size.width() - images_[LEFT]->width() - images_[RIGHT]->width(), height_);
}
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index 44cf9c7..478ae33 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -396,11 +396,11 @@ void CustomFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
// Top.
int top_edge_y = client_area_top - top->height();
- canvas->DrawBitmapInt(*top_left, client_area_bounds.x() - top_left->width(),
- top_edge_y);
+ canvas->DrawImageInt(*top_left, client_area_bounds.x() - top_left->width(),
+ top_edge_y);
canvas->TileImageInt(*top, client_area_bounds.x(), top_edge_y,
client_area_bounds.width(), top->height());
- canvas->DrawBitmapInt(*top_right, client_area_bounds.right(), top_edge_y);
+ canvas->DrawImageInt(*top_right, client_area_bounds.right(), top_edge_y);
// Right.
int client_area_bottom =
@@ -410,11 +410,11 @@ void CustomFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
right->width(), client_area_height);
// Bottom.
- canvas->DrawBitmapInt(*bottom_right, client_area_bounds.right(),
- client_area_bottom);
+ canvas->DrawImageInt(*bottom_right, client_area_bounds.right(),
+ client_area_bottom);
canvas->TileImageInt(*bottom, client_area_bounds.x(), client_area_bottom,
client_area_bounds.width(), bottom_right->height());
- canvas->DrawBitmapInt(*bottom_left,
+ canvas->DrawImageInt(*bottom_left,
client_area_bounds.x() - bottom_left->width(), client_area_bottom);
// Left.
diff --git a/ui/views/window/frame_background.cc b/ui/views/window/frame_background.cc
index 59e205f..111ac25 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -66,17 +66,17 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
// Draw the theme frame overlay, if available.
if (theme_overlay_image_)
- canvas->DrawBitmapInt(*theme_overlay_image_, 0, 0);
+ canvas->DrawImageInt(*theme_overlay_image_, 0, 0);
// Draw the top corners and edge, scaling the corner images down if they
// are too big and relative to the vertical space available.
int top_left_height =
std::min(top_left_corner_->height(),
view->height() - bottom_left_corner_->height());
- canvas->DrawBitmapInt(*top_left_corner_,
- 0, 0, top_left_corner_->width(), top_left_height,
- 0, 0, top_left_corner_->width(), top_left_height,
- false);
+ canvas->DrawImageInt(*top_left_corner_,
+ 0, 0, top_left_corner_->width(), top_left_height,
+ 0, 0, top_left_corner_->width(), top_left_height,
+ false);
canvas->TileImageInt(*top_edge_,
top_left_corner_->width(),
0,
@@ -85,12 +85,12 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
int top_right_height =
std::min(top_right_corner_->height(),
view->height() - bottom_right_corner_->height());
- canvas->DrawBitmapInt(*top_right_corner_,
- 0, 0,
- top_right_corner_->width(), top_right_height,
- view->width() - top_right_corner_->width(), 0,
- top_right_corner_->width(), top_right_height,
- false);
+ canvas->DrawImageInt(*top_right_corner_,
+ 0, 0,
+ top_right_corner_->width(), top_right_height,
+ view->width() - top_right_corner_->width(), 0,
+ top_right_corner_->width(), top_right_height,
+ false);
// Right edge.
int right_edge_height =
@@ -102,9 +102,9 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
right_edge_height);
// Bottom corners and edge.
- canvas->DrawBitmapInt(*bottom_right_corner_,
- view->width() - bottom_right_corner_->width(),
- view->height() - bottom_right_corner_->height());
+ canvas->DrawImageInt(*bottom_right_corner_,
+ view->width() - bottom_right_corner_->width(),
+ view->height() - bottom_right_corner_->height());
canvas->TileImageInt(
*bottom_edge_,
bottom_left_corner_->width(),
@@ -112,8 +112,8 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
view->width() - bottom_left_corner_->width()
- bottom_right_corner_->width(),
bottom_edge_->height());
- canvas->DrawBitmapInt(*bottom_left_corner_, 0,
- view->height() - bottom_left_corner_->height());
+ canvas->DrawImageInt(*bottom_left_corner_, 0,
+ view->height() - bottom_left_corner_->height());
// Left edge.
int left_edge_height =
@@ -145,9 +145,9 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
DCHECK(maximized_top_left_ && maximized_top_right_);
left_offset = maximized_top_left_->width();
right_offset = maximized_top_right_->width();
- canvas->DrawBitmapInt(*maximized_top_left_, 0, 0);
- canvas->DrawBitmapInt(*maximized_top_right_,
- view->width() - right_offset, 0);
+ canvas->DrawImageInt(*maximized_top_left_, 0, 0);
+ canvas->DrawImageInt(*maximized_top_right_,
+ view->width() - right_offset, 0);
}
// Draw the theme frame.
@@ -158,7 +158,7 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
theme_image_->height());
// Draw the theme frame overlay, if available.
if (theme_overlay_image_)
- canvas->DrawBitmapInt(*theme_overlay_image_, 0, theme_background_y_);
+ canvas->DrawImageInt(*theme_overlay_image_, 0, theme_background_y_);
}
void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {