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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_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/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 9cf5762225aeb28e804ca84e1244bca31950ee01..95bf48293f9d204f701b4719de0145c44ecbbaed 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -31,6 +31,7 @@
#include "ui/base/models/menu_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/paint_context.h"
+#include "ui/compositor/paint_recorder.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/canvas.h"
@@ -756,10 +757,10 @@ const char* AutofillDialogViews::NotificationArea::GetClassName() const {
void AutofillDialogViews::NotificationArea::PaintChildren(
const ui::PaintContext& context) {
views::View::PaintChildren(context);
- gfx::Canvas* canvas = context.canvas();
if (HasArrow()) {
+ ui::PaintRecorder recorder(context);
DrawArrow(
- canvas,
+ recorder.canvas(),
GetMirroredXInView(width() - arrow_centering_anchor_->width() / 2.0f),
notifications_[0].GetBackgroundColor(),
notifications_[0].GetBorderColor());

Powered by Google App Engine
This is Rietveld 408576698