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

Unified Diff: chrome/browser/views/tabs/dragged_tab_controller.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/dragged_tab_controller.cc
===================================================================
--- chrome/browser/views/tabs/dragged_tab_controller.cc (revision 50661)
+++ chrome/browser/views/tabs/dragged_tab_controller.cc (working copy)
@@ -30,7 +30,7 @@
#include "chrome/browser/views/tabs/tab.h"
#include "chrome/browser/views/tabs/tab_strip.h"
#include "chrome/common/notification_service.h"
-#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/event.h"
@@ -85,8 +85,9 @@
SkPaint paint;
paint.setColor(SkColorSetRGB(108, 108, 108));
paint.setStyle(SkPaint::kFill_Style);
- canvas->drawRoundRect(outer_rect, SkIntToScalar(kRoundedRectRadius),
- SkIntToScalar(kRoundedRectRadius), paint);
+ canvas->AsCanvasSkia()->drawRoundRect(
+ outer_rect, SkIntToScalar(kRoundedRectRadius),
+ SkIntToScalar(kRoundedRectRadius), paint);
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
@@ -96,7 +97,7 @@
bool rtl_ui = base::i18n::IsRTL();
if (rtl_ui) {
// Flip canvas to draw the mirrored tab images for RTL UI.
- canvas->save();
+ canvas->AsCanvasSkia()->save();
canvas->TranslateInt(width(), 0);
canvas->ScaleInt(-1, 1);
}
@@ -170,7 +171,7 @@
break;
}
if (rtl_ui)
- canvas->restore();
+ canvas->AsCanvasSkia()->restore();
}
private:

Powered by Google App Engine
This is Rietveld 408576698