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

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.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/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index a63d61949ca980d6b299a7814a684fb69b22970c..9ff38c2d9d545fdd29dd01747dee4bcc0a15c9a3 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -572,7 +572,7 @@ Windows10CaptionButton* GlassBrowserFrameView::CreateCaptionButton(
void GlassBrowserFrameView::PaintTitlebar(gfx::Canvas* canvas) const {
gfx::Rect tabstrip_bounds = GetBoundsForTabStrip(browser_view()->tabstrip());
- SkPaint paint;
+ cc::PaintFlags flags;
gfx::ScopedCanvas scoped_canvas(canvas);
float scale = canvas->UndoDeviceScaleFactor();
// This is the pixel-accurate version of WindowTopY(). Scaling the DIP values
@@ -601,18 +601,18 @@ void GlassBrowserFrameView::PaintTitlebar(gfx::Canvas* canvas) const {
// are #565656 with 80% alpha. We copy Edge (which also custom-draws its top
// border) and use #A2A2A2 instead.
constexpr SkColor inactive_border_color = 0xFFA2A2A2;
- paint.setColor(
+ flags.setColor(
ShouldPaintAsActive()
? GetThemeProvider()->GetColor(ThemeProperties::COLOR_ACCENT_BORDER)
: inactive_border_color);
- canvas->DrawRect(gfx::RectF(0, 0, width() * scale, y), paint);
+ canvas->DrawRect(gfx::RectF(0, 0, width() * scale, y), flags);
const gfx::Rect titlebar_rect = gfx::ToEnclosingRect(
gfx::RectF(0, y, width() * scale, tabstrip_bounds.bottom() * scale - y));
// Paint the titlebar first so we have a background if an area isn't covered
// by the theme image.
- paint.setColor(GetTitlebarColor());
- canvas->DrawRect(titlebar_rect, paint);
+ flags.setColor(GetTitlebarColor());
+ canvas->DrawRect(titlebar_rect, flags);
const gfx::ImageSkia frame_image = GetFrameImage();
if (!frame_image.isNull()) {
canvas->TileImageInt(frame_image, 0, 0, scale, scale, titlebar_rect.x(),

Powered by Google App Engine
This is Rietveld 408576698