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

Unified Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 1054783003: views: Access the Canvas through recorders not through PaintContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/autofill/card_unmask_prompt_views.cc
diff --git a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
index b3cf6b4dcb119494bcb777afba719086c3dad5ec..a7af6502ee5e157670546370f86bfe63effd8fdb 100644
--- a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
+++ b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
@@ -19,6 +19,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/compositor/compositing_recorder.h"
#include "ui/compositor/paint_context.h"
#include "ui/gfx/canvas.h"
#include "ui/views/background.h"
@@ -465,10 +466,8 @@ void CardUnmaskPromptViews::FadeOutView::PaintChildren(
if (opacity_ > 0.99)
return views::View::PaintChildren(context);
- gfx::Canvas* canvas = context.canvas();
- canvas->SaveLayerAlpha(0xff * opacity_);
+ ui::CompositingRecorder recorder(context, opacity_);
views::View::PaintChildren(context);
- canvas->Restore();
}
void CardUnmaskPromptViews::FadeOutView::OnPaint(gfx::Canvas* canvas) {

Powered by Google App Engine
This is Rietveld 408576698