summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs/tab.cc')
-rw-r--r--chrome/browser/views/tabs/tab.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index 82ab751..22e424a 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -379,15 +379,12 @@ void Tab::PaintTabBackground(gfx::Canvas* canvas) {
double throb_value = GetThrobValue();
if (throb_value > 0) {
- SkRect bounds;
- bounds.set(0, 0, SkIntToScalar(width()), SkIntToScalar(height()));
- canvas->AsCanvasSkia()->saveLayerAlpha(
- &bounds, static_cast<int>(throb_value * 0xff),
- SkCanvas::kARGB_ClipLayer_SaveFlag);
+ canvas->SaveLayerAlpha(static_cast<int>(throb_value * 0xff),
+ gfx::Rect(width(), height()));
canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255,
SkXfermode::kClear_Mode);
PaintActiveTabBackground(canvas);
- canvas->AsCanvasSkia()->restore();
+ canvas->Restore();
}
}
}
@@ -438,10 +435,9 @@ void Tab::PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas) {
// And then the gradient on top of that.
if (mini_title_animation_->current_part_index() == 2) {
- canvas->AsCanvasSkia()->saveLayerAlpha(
- NULL, mini_title_animation_->CurrentValueBetween(255, 0));
+ canvas->SaveLayerAlpha(mini_title_animation_->CurrentValueBetween(255, 0));
canvas->DrawBitmapInt(hover_image, 0, 0);
- canvas->AsCanvasSkia()->restore();
+ canvas->Restore();
} else {
canvas->DrawBitmapInt(hover_image, 0, 0);
}