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

Unified Diff: ash/common/system/user/rounded_image_view.cc

Issue 2780963002: ash: Fix system tray avatar not updated regression (Closed)
Patch Set: resized_ -> resized_image_ Created 3 years, 9 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 | « ash/common/system/user/rounded_image_view.h ('k') | ash/common/system/user/tray_user.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/rounded_image_view.cc
diff --git a/ash/common/system/user/rounded_image_view.cc b/ash/common/system/user/rounded_image_view.cc
index cef81547ea855374a7c7a8f40b53f38f39272903..4e6b1646cfd7d44de0501ac53cc6f7a1b036a503 100644
--- a/ash/common/system/user/rounded_image_view.cc
+++ b/ash/common/system/user/rounded_image_view.cc
@@ -20,14 +20,13 @@ RoundedImageView::RoundedImageView(int corner_radius) {
RoundedImageView::~RoundedImageView() {}
-void RoundedImageView::SetImage(const gfx::ImageSkia& img,
+void RoundedImageView::SetImage(const gfx::ImageSkia& image,
const gfx::Size& size) {
- image_ = img;
image_size_ = size;
// Try to get the best image quality for the avatar.
- resized_ = gfx::ImageSkiaOperations::CreateResizedImage(
- image_, skia::ImageOperations::RESIZE_BEST, size);
+ resized_image_ = gfx::ImageSkiaOperations::CreateResizedImage(
+ image, skia::ImageOperations::RESIZE_BEST, size);
if (GetWidget() && visible()) {
PreferredSizeChanged();
SchedulePaint();
@@ -63,8 +62,8 @@ void RoundedImageView::OnPaint(gfx::Canvas* canvas) {
path.addRoundRect(gfx::RectToSkRect(image_bounds), kRadius);
cc::PaintFlags flags;
flags.setAntiAlias(true);
- canvas->DrawImageInPath(resized_, image_bounds.x(), image_bounds.y(), path,
- flags);
+ canvas->DrawImageInPath(resized_image_, image_bounds.x(), image_bounds.y(),
+ path, flags);
}
} // namespace tray
« no previous file with comments | « ash/common/system/user/rounded_image_view.h ('k') | ash/common/system/user/tray_user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698