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

Unified Diff: chrome/browser/chromeos/login/rounded_view.h

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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/chromeos/login/rounded_view.h
diff --git a/chrome/browser/chromeos/login/rounded_view.h b/chrome/browser/chromeos/login/rounded_view.h
index c1080d70f6687ad172f9d75e96339901c7cfd825..376871290d0c25f19414bedf6d8c84cc47493b63 100644
--- a/chrome/browser/chromeos/login/rounded_view.h
+++ b/chrome/browser/chromeos/login/rounded_view.h
@@ -61,7 +61,7 @@ template <typename C>
void RoundedView<C>::Paint(gfx::Canvas* canvas) {
// Setup clip region.
canvas->Save();
- canvas->AsCanvasSkia()->clipPath(GetClipPath());
+ canvas->GetSkCanvas()->clipPath(GetClipPath());
// Do original painting.
C::Paint(canvas);
canvas->Restore();
@@ -112,7 +112,7 @@ void RoundedView<C>::DrawFrame(gfx::Canvas* canvas) {
view_rect.fTop -= kOriginShift;
view_rect.inset(rounded_view::kStrokeWidth, rounded_view::kStrokeWidth);
paint.setColor(rounded_view::kInnerFrameColor);
- canvas->AsCanvasSkia()->
+ canvas->GetSkCanvas()->
drawRoundRect(view_rect,
rounded_view::kCornerRadius - rounded_view::kStrokeWidth,
rounded_view::kCornerRadius - rounded_view::kStrokeWidth,
@@ -124,7 +124,7 @@ void RoundedView<C>::DrawFrame(gfx::Canvas* canvas) {
view_rect.offset(rounded_view::kStrokeWidth - kDelta,
rounded_view::kStrokeWidth - kDelta);
paint.setColor(rounded_view::kOuterFrameColor);
- canvas->AsCanvasSkia()->drawRoundRect(view_rect, rounded_view::kCornerRadius,
+ canvas->GetSkCanvas()->drawRoundRect(view_rect, rounded_view::kCornerRadius,
rounded_view::kCornerRadius, paint);
}

Powered by Google App Engine
This is Rietveld 408576698