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

Unified Diff: chrome/browser/views/frame/glass_browser_frame_view.cc

Issue 2811032: Revert 50784 - 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
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/glass_browser_frame_view.cc
===================================================================
--- chrome/browser/views/frame/glass_browser_frame_view.cc (revision 50789)
+++ chrome/browser/views/frame/glass_browser_frame_view.cc (working copy)
@@ -12,7 +12,7 @@
#include "chrome/browser/views/tabs/side_tab_strip.h"
#include "chrome/browser/views/tabs/tab.h"
#include "chrome/browser/views/tabs/tab_strip.h"
-#include "gfx/canvas_skia.h"
+#include "gfx/canvas.h"
#include "gfx/icon_util.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
@@ -264,14 +264,14 @@
// Draw left edge. We explicitly set a clip as the image is bigger than just
// the corner.
- canvas->AsCanvasSkia()->save();
+ canvas->save();
canvas->ClipRectInt(x - kNonClientBorderThickness,
y - kNonClientBorderThickness,
kNonClientBorderThickness,
kNonClientBorderThickness);
canvas->DrawBitmapInt(*toolbar_left, x - kNonClientBorderThickness,
y - kNonClientBorderThickness);
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
// Draw center edge. We need to draw a while line above the toolbar for the
// image to overlay nicely.
@@ -279,14 +279,14 @@
canvas->TileImageInt(*toolbar_center, x, y - kNonClientBorderThickness, w,
toolbar_center->height());
// Right edge. Again, we have to clip because of image size.
- canvas->AsCanvasSkia()->save();
+ canvas->save();
canvas->ClipRectInt(x + w - kNonClientBorderThickness,
y - kNonClientBorderThickness,
kNonClientBorderThickness,
kNonClientBorderThickness);
canvas->DrawBitmapInt(*tp->GetBitmapNamed(IDR_CONTENT_TOP_RIGHT_CORNER),
x + w, y);
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
} else {
// Draw the toolbar background, setting src_y of the paint to the tab
// strip height as the toolbar background begins at the top of the tabs.
@@ -356,11 +356,11 @@
gfx::Point tabstrip_origin(browser_view_->tabstrip()->bounds().origin());
View::ConvertPointToView(frame_->GetWindow()->GetClientView(), this,
&tabstrip_origin);
- canvas->AsCanvasSkia()->save();
+ canvas->save();
canvas->ClipRectInt(dst_x, 2, w, tabstrip_origin.y() - 4);
canvas->DrawBitmapInt(otr_avatar_icon, src_x, src_y, w, h, dst_x, dst_y,
w, h, false);
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
} else {
canvas->DrawBitmapInt(otr_avatar_icon, src_x, src_y, w, h, dst_x, dst_y,
w, h, false);
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698