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

Unified Diff: chrome/browser/ui/app_list/extension_app_item.cc

Issue 2717943002: Fix cc/paint skia type mismatches (Closed)
Patch Set: Rebase Created 3 years, 10 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/app_list/extension_app_item.cc
diff --git a/chrome/browser/ui/app_list/extension_app_item.cc b/chrome/browser/ui/app_list/extension_app_item.cc
index 7c8178eda5aa8d813fa9227d45ef4a979c38662d..6c5261efeffa49d6812e5643bb4aa887a410c65d 100644
--- a/chrome/browser/ui/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/app_list/extension_app_item.cc
@@ -87,17 +87,16 @@ class RoundedCornersImageSource : public gfx::CanvasImageSource {
new gfx::Canvas(gfx::Size(icon_.width(), icon_.height()), 1.0f, false));
DCHECK(masking_canvas);
- SkPaint opaque_paint;
- opaque_paint.setColor(SK_ColorWHITE);
- opaque_paint.setFlags(SkPaint::kAntiAlias_Flag);
- masking_canvas->DrawRoundRect(
- gfx::Rect(icon_.width(), icon_.height()),
- kRoundingRadius, opaque_paint);
-
- SkPaint masking_paint;
- masking_paint.setBlendMode(SkBlendMode::kDstIn);
- canvas->DrawImageInt(
- gfx::ImageSkia(masking_canvas->ExtractImageRep()), 0, 0, masking_paint);
+ cc::PaintFlags opaque_flags;
+ opaque_flags.setAntiAlias(true);
+ opaque_flags.setColor(SK_ColorWHITE);
+ masking_canvas->DrawRoundRect(gfx::Rect(icon_.width(), icon_.height()),
+ kRoundingRadius, opaque_flags);
+
+ cc::PaintFlags masking_flags;
+ masking_flags.setBlendMode(SkBlendMode::kDstIn);
+ canvas->DrawImageInt(gfx::ImageSkia(masking_canvas->ExtractImageRep()), 0,
+ 0, masking_flags);
}
gfx::ImageSkia icon_;
« no previous file with comments | « chrome/browser/chromeos/ui/kiosk_external_update_notification.cc ('k') | chrome/browser/ui/libgtkui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698