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

Unified Diff: views/painter.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 | « views/drag_utils_win.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/painter.cc
===================================================================
--- views/painter.cc (revision 50789)
+++ views/painter.cc (working copy)
@@ -7,7 +7,6 @@
#include "app/resource_bundle.h"
#include "base/logging.h"
#include "gfx/canvas.h"
-#include "gfx/canvas_skia.h"
#include "gfx/insets.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -44,9 +43,8 @@
// Need to unref shader, otherwise never deleted.
s->unref();
- canvas->AsCanvasSkia()->drawRectCoords(
- SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(w), SkIntToScalar(h),
- paint);
+ canvas->drawRectCoords(SkIntToScalar(0), SkIntToScalar(0),
+ SkIntToScalar(w), SkIntToScalar(h), paint);
}
private:
@@ -148,10 +146,10 @@
DCHECK(canvas && painter);
if (w < 0 || h < 0)
return;
- canvas->AsCanvasSkia()->save();
+ canvas->save();
canvas->TranslateInt(x, y);
painter->Paint(w, h, canvas);
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
}
// static
« no previous file with comments | « views/drag_utils_win.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698