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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_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/autocomplete/autocomplete_popup_contents_view.cc
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index 35bb187bee979dd408c358fd18c510ee1e34c5a8..5b7238a7d972ce40ea02d70d64d423a571831b55 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -520,7 +520,7 @@ void AutocompletePopupContentsView::OnMouseExited(
// AutocompletePopupContentsView, protected:
void AutocompletePopupContentsView::PaintResultViews(gfx::CanvasSkia* canvas) {
- canvas->drawColor(AutocompleteResultView::GetColor(
+ canvas->sk_canvas()->drawColor(AutocompleteResultView::GetColor(
AutocompleteResultView::NORMAL, AutocompleteResultView::BACKGROUND));
View::PaintChildren(canvas);
}
@@ -570,7 +570,7 @@ void AutocompletePopupContentsView::OnPaint(gfx::Canvas* canvas) {
paint.setAntiAlias(true);
SkShader* shader = SkShader::CreateBitmapShader(
- contents_canvas.getDevice()->accessBitmap(false),
+ contents_canvas.sk_canvas()->getDevice()->accessBitmap(false),
SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode);
paint.setShader(shader);
@@ -578,7 +578,7 @@ void AutocompletePopupContentsView::OnPaint(gfx::Canvas* canvas) {
gfx::Path path;
MakeContentsPath(&path, GetContentsBounds());
- canvas->AsCanvasSkia()->drawPath(path, paint);
+ canvas->GetSkCanvas()->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
@@ -644,7 +644,7 @@ void AutocompletePopupContentsView::MakeCanvasTransparent(
// Allow the window blur effect to show through the popup background.
SkAlpha alpha = GetThemeProvider()->ShouldUseNativeFrame() ?
kGlassPopupAlpha : kOpaquePopupAlpha;
- canvas->AsCanvasSkia()->drawColor(SkColorSetA(
+ canvas->GetSkCanvas()->drawColor(SkColorSetA(
AutocompleteResultView::GetColor(AutocompleteResultView::NORMAL,
AutocompleteResultView::BACKGROUND), alpha), SkXfermode::kDstIn_Mode);
}

Powered by Google App Engine
This is Rietveld 408576698