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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (revision 82144)
+++ chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -480,7 +480,7 @@
// AutocompletePopupContentsView, protected:
void AutocompletePopupContentsView::PaintResultViews(gfx::CanvasSkia* canvas) {
- canvas->drawColor(AutocompleteResultView::GetColor(
+ canvas->skia_canvas()->drawColor(AutocompleteResultView::GetColor(
AutocompleteResultView::NORMAL, AutocompleteResultView::BACKGROUND));
View::PaintChildren(canvas);
}
@@ -516,7 +516,8 @@
// Instead, we paint all our children into a second canvas and use that as a
// shader to fill a path representing the round-rect clipping region. This
// yields a nice anti-aliased edge.
- gfx::CanvasSkia contents_canvas(width(), height(), true);
+ gfx::CanvasSkia contents_canvas;
+ contents_canvas.Init(width(), height(), true);
PaintResultViews(&contents_canvas);
// We want the contents background to be slightly transparent so we can see
@@ -530,7 +531,7 @@
paint.setAntiAlias(true);
SkShader* shader = SkShader::CreateBitmapShader(
- contents_canvas.getDevice()->accessBitmap(false),
+ contents_canvas.skia_canvas()->getDevice()->accessBitmap(false),
SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode);
paint.setShader(shader);
@@ -538,7 +539,7 @@
gfx::Path path;
MakeContentsPath(&path, GetContentsBounds());
- canvas->AsCanvasSkia()->drawPath(path, paint);
+ canvas->AsCanvasSkia()->skia_canvas()->drawPath(path, paint);
// Now we paint the border, so it will be alpha-blended atop the contents.
// This looks slightly better in the corners than drawing the contents atop
@@ -608,7 +609,7 @@
// Allow the window blur effect to show through the popup background.
SkAlpha alpha = GetThemeProvider()->ShouldUseNativeFrame() ?
kGlassPopupAlpha : kOpaquePopupAlpha;
- canvas->AsCanvasSkia()->drawColor(SkColorSetA(
+ canvas->AsCanvasSkia()->skia_canvas()->drawColor(SkColorSetA(
AutocompleteResultView::GetColor(AutocompleteResultView::NORMAL,
AutocompleteResultView::BACKGROUND), alpha), SkXfermode::kDstIn_Mode);
}
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698