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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.cc

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/ui/views/location_bar/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 4eca62ad2988380f038477fa8ef5ce140ec8c571..11c183537c74dd91f961d0f30cd8873ea89004b9 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -202,15 +202,15 @@ void ContentSettingImageView::OnPaintBackground(gfx::Canvas* canvas) {
SkSafeUnref(paint.getShader());
SkRect color_rect;
color_rect.iset(0, 0, width() - 1, height() - 1);
- canvas->AsCanvasSkia()->drawRoundRect(color_rect, kBoxCornerRadius,
- kBoxCornerRadius, paint);
+ canvas->GetSkCanvas()->drawRoundRect(color_rect, kBoxCornerRadius,
+ kBoxCornerRadius, paint);
SkPaint outer_paint;
outer_paint.setStyle(SkPaint::kStroke_Style);
outer_paint.setColor(kBorderColor);
color_rect.inset(SkIntToScalar(kEdgeThickness),
SkIntToScalar(kEdgeThickness));
- canvas->AsCanvasSkia()->drawRoundRect(color_rect, kBoxCornerRadius,
- kBoxCornerRadius, outer_paint);
+ canvas->GetSkCanvas()->drawRoundRect(color_rect, kBoxCornerRadius,
+ kBoxCornerRadius, outer_paint);
}
void ContentSettingImageView::BubbleClosing(Bubble* bubble,

Powered by Google App Engine
This is Rietveld 408576698