Index: chrome/browser/ui/views/tabs/tab.cc |
=================================================================== |
--- chrome/browser/ui/views/tabs/tab.cc (revision 82144) |
+++ chrome/browser/ui/views/tabs/tab.cc (working copy) |
@@ -379,8 +379,8 @@ |
if (throb_value > 0) { |
canvas->SaveLayerAlpha(static_cast<int>(throb_value * 0xff), |
gfx::Rect(width(), height())); |
- canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255, |
- SkXfermode::kClear_Mode); |
+ canvas->AsCanvasSkia()->skia_canvas()->drawARGB( |
+ 0, 255, 255, 255, SkXfermode::kClear_Mode); |
PaintActiveTabBackground(canvas); |
canvas->Restore(); |
} |
@@ -389,13 +389,15 @@ |
void Tab::PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas) { |
// Render the inactive tab background. We'll use this for clipping. |
- gfx::CanvasSkia background_canvas(width(), height(), false); |
+ gfx::CanvasSkia background_canvas; |
+ background_canvas.Init(width(), height(), false); |
PaintInactiveTabBackground(&background_canvas); |
SkBitmap background_image = background_canvas.ExtractBitmap(); |
// Draw a radial gradient to hover_canvas. |
- gfx::CanvasSkia hover_canvas(width(), height(), false); |
+ gfx::CanvasSkia hover_canvas; |
+ hover_canvas.Init(width(), height(), false); |
int radius = kMiniTitleChangeGradientRadius; |
int x0 = width() + radius - kMiniTitleChangeInitialXOffset; |
int x1 = radius; |
@@ -471,7 +473,8 @@ |
// We need a CanvasSkia object to be able to extract the bitmap from. |
// We draw everything to this canvas and then output it to the canvas |
// parameter in addition to using it to mask the hover glow if needed. |
- gfx::CanvasSkia background_canvas(width(), height(), false); |
+ gfx::CanvasSkia background_canvas; |
+ background_canvas.Init(width(), height(), false); |
// Draw left edge. Don't draw over the toolbar, as we're not the foreground |
// tab. |
@@ -572,7 +575,8 @@ |
SkBitmap Tab::DrawHoverGlowBitmap(int width_input, int height_input) { |
// Draw a radial gradient to hover_canvas so we can export the bitmap. |
- gfx::CanvasSkia hover_canvas(width_input, height_input, false); |
+ gfx::CanvasSkia hover_canvas; |
+ hover_canvas.Init(width_input, height_input, false); |
// Draw a radial gradient to hover_canvas. |
int radius = width() / 3; |