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

Unified Diff: chrome/browser/views/infobars/translate_infobars.cc

Issue 2811032: Revert 50784 - Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/views/infobars/translate_infobar_base.cc ('k') | chrome/browser/views/list_background.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/infobars/translate_infobars.cc
===================================================================
--- chrome/browser/views/infobars/translate_infobars.cc (revision 50789)
+++ chrome/browser/views/infobars/translate_infobars.cc (working copy)
@@ -19,7 +19,7 @@
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/browser/views/infobars/infobar_button_border.h"
#include "chrome/browser/views/infobars/infobar_text_button.h"
-#include "gfx/canvas_skia.h"
+#include "gfx/canvas.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -757,12 +757,11 @@
double animation_value, TranslateInfoBarDelegate::TranslateState state) {
// Draw background into an offscreen buffer with alpha value per animation
// value, then blend it back into the current canvas.
- canvas->AsCanvasSkia()->saveLayerAlpha(
- NULL, static_cast<int>(animation_value * 255),
+ canvas->saveLayerAlpha(NULL, static_cast<int>(animation_value * 255),
SkCanvas::kARGB_NoClipLayer_SaveFlag);
- canvas->AsCanvasSkia()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
+ canvas->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
GetBackground(state)->Paint(canvas, this);
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
}
inline TranslateInfoBarDelegate* TranslateInfoBar::GetDelegate() const {
« no previous file with comments | « chrome/browser/views/infobars/translate_infobar_base.cc ('k') | chrome/browser/views/list_background.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698