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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 1062813004: views: Use ClipTransformRecorder to access canvas in ProfileChooserView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: profilechooser-recorder: explicit 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
« no previous file with comments | « no previous file | ui/compositor/clip_transform_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index 32db4a9b398a3273d3e22af641fab2478067c9f6..f0f5e5a98035035b3bb4b791720fe73ad8e90c1a 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -43,6 +43,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/clip_transform_recorder.h"
#include "ui/compositor/paint_context.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
@@ -260,7 +261,8 @@ class EditableProfilePhoto : public views::LabelButton {
void PaintChildren(const ui::PaintContext& context) override {
// Display any children (the "change photo" overlay) as a circle.
- context.canvas()->ClipPath(circular_mask_, true);
+ ui::ClipTransformRecorder clip_transform_recorder(context);
+ clip_transform_recorder.ClipPathWithAntiAliasing(circular_mask_);
View::PaintChildren(context);
}
« no previous file with comments | « no previous file | ui/compositor/clip_transform_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698