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

Unified Diff: chrome/browser/views/tabs/side_tab.cc

Issue 2825018: Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
Index: chrome/browser/views/tabs/side_tab.cc
===================================================================
--- chrome/browser/views/tabs/side_tab.cc (revision 50661)
+++ chrome/browser/views/tabs/side_tab.cc (working copy)
@@ -8,7 +8,7 @@
#include "app/theme_provider.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
-#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/favicon_size.h"
#include "gfx/path.h"
#include "gfx/skia_util.h"
@@ -91,18 +91,20 @@
paint.setAntiAlias(true);
SkRect border_rect = { SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(width()), SkIntToScalar(height()) };
- canvas->drawRoundRect(border_rect, SkIntToScalar(kRoundRectRadius),
- SkIntToScalar(kRoundRectRadius), paint);
+ canvas->AsCanvasSkia()->drawRoundRect(border_rect,
+ SkIntToScalar(kRoundRectRadius),
+ SkIntToScalar(kRoundRectRadius),
+ paint);
}
if (ShouldShowIcon()) {
if (data().phantom) {
SkRect bounds;
bounds.set(0, 0, SkIntToScalar(width()), SkIntToScalar(height()));
- canvas->saveLayerAlpha(&bounds, kPhantomTabIconAlpha,
- SkCanvas::kARGB_ClipLayer_SaveFlag);
+ canvas->AsCanvasSkia()->saveLayerAlpha(
+ &bounds, kPhantomTabIconAlpha, SkCanvas::kARGB_ClipLayer_SaveFlag);
PaintIcon(canvas, icon_bounds_.x(), icon_bounds_.y());
- canvas->restore();
+ canvas->AsCanvasSkia()->restore();
} else {
PaintIcon(canvas, icon_bounds_.x(), icon_bounds_.y());
}

Powered by Google App Engine
This is Rietveld 408576698