Index: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc |
=================================================================== |
--- chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (revision 50789) |
+++ chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (working copy) |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
#include "chrome/browser/views/bubble_border.h" |
#include "chrome/browser/views/location_bar/location_bar_view.h" |
+#include "gfx/canvas.h" |
#include "gfx/canvas_skia.h" |
#include "gfx/color_utils.h" |
#include "gfx/insets.h" |
@@ -272,7 +273,7 @@ |
void AutocompleteResultView::Paint(gfx::Canvas* canvas) { |
const ResultViewState state = GetState(); |
if (state != NORMAL) |
- canvas->AsCanvasSkia()->drawColor(GetColor(state, BACKGROUND)); |
+ canvas->drawColor(GetColor(state, BACKGROUND)); |
// Paint the icon. |
canvas->DrawBitmapInt(*GetIcon(), MirroredLeftPointForRect(icon_bounds_), |
@@ -764,7 +765,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); |
+ // TODO(beng): Convert to CanvasSkia |
+ gfx::Canvas contents_canvas(width(), height(), true); |
contents_canvas.drawColor(GetColor(NORMAL, BACKGROUND)); |
View::PaintChildren(&contents_canvas); |
// We want the contents background to be slightly transparent so we can see |
@@ -786,7 +788,7 @@ |
gfx::Path path; |
MakeContentsPath(&path, GetLocalBounds(false)); |
- canvas->AsCanvasSkia()->drawPath(path, paint); |
+ 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 |
@@ -933,9 +935,8 @@ |
// Allow the window blur effect to show through the popup background. |
SkAlpha alpha = GetThemeProvider()->ShouldUseNativeFrame() ? |
kGlassPopupAlpha : kOpaquePopupAlpha; |
- canvas->AsCanvasSkia()->drawColor( |
- SkColorSetA(GetColor(NORMAL, BACKGROUND), alpha), |
- SkXfermode::kDstIn_Mode); |
+ canvas->drawColor(SkColorSetA(GetColor(NORMAL, BACKGROUND), alpha), |
+ SkXfermode::kDstIn_Mode); |
} |
void AutocompletePopupContentsView::OpenIndex( |