Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/side_tab.cc ('k') | chrome/browser/ui/views/theme_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/ui/views/tabs/side_tab.cc ('k') | chrome/browser/ui/views/theme_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698