diff options
Diffstat (limited to 'chrome/browser/ui/views/tabs')
-rw-r--r-- | chrome/browser/ui/views/tabs/base_tab.cc | 8 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/tab.cc | 26 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/tab_drag_controller.cc | 22 | ||||
-rw-r--r-- | chrome/browser/ui/views/tabs/tab_strip.cc | 6 |
4 files changed, 31 insertions, 31 deletions
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(); |