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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 2697663002: Clean up naming of paint-related identifiers (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
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index ae610e90bedbc05a92769c75d0b5bd2a43a69f81..9a51bd97d78b34a9c79a706a4d055070de23819d 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -217,13 +217,13 @@ void DrawHighlight(gfx::Canvas* canvas,
SkScalar radius,
SkColor color) {
const SkColor colors[2] = { color, SkColorSetA(color, 0) };
- cc::PaintFlags paint;
- paint.setAntiAlias(true);
- paint.setShader(cc::WrapSkShader(SkGradientShader::MakeRadial(
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
+ flags.setShader(cc::WrapSkShader(SkGradientShader::MakeRadial(
p, radius, colors, nullptr, 2, SkShader::kClamp_TileMode)));
canvas->sk_canvas()->drawRect(
SkRect::MakeXYWH(p.x() - radius, p.y() - radius, radius * 2, radius * 2),
- paint);
+ flags);
}
// Returns whether the favicon for the given URL should be colored according to
@@ -1286,8 +1286,8 @@ void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas,
int fill_id,
int y_offset) {
gfx::Path fill;
- cc::PaintFlags paint;
- paint.setAntiAlias(true);
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
// Draw the fill.
{
@@ -1307,11 +1307,11 @@ void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas,
GetMirroredX() + background_offset_.x(),
y_offset, 0, 0, width(), height());
} else {
- paint.setColor(
+ flags.setColor(
is_active ? toolbar_color
: tp->GetColor(ThemeProperties::COLOR_BACKGROUND_TAB));
fill_canvas->DrawRect(
- gfx::ScaleToEnclosingRect(GetLocalBounds(), scale), paint);
+ gfx::ScaleToEnclosingRect(GetLocalBounds(), scale), flags);
}
if (!is_active && hover_controller_.ShouldDraw()) {
@@ -1340,8 +1340,8 @@ void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas,
stroke_canvas->ClipRect(
gfx::RectF(width() * scale, height() * scale - 1));
}
- paint.setColor(controller_->GetToolbarTopSeparatorColor());
- stroke_canvas->DrawPath(stroke, paint);
+ flags.setColor(controller_->GetToolbarTopSeparatorColor());
+ stroke_canvas->DrawPath(stroke, flags);
}
}
@@ -1358,12 +1358,12 @@ void Tab::PaintPinnedTabTitleChangedIndicatorAndIcon(
gfx::Canvas icon_canvas(gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize),
canvas->image_scale(), false);
icon_canvas.DrawImageInt(favicon_, 0, 0);
- cc::PaintFlags clear_paint;
- clear_paint.setAntiAlias(true);
- clear_paint.setBlendMode(SkBlendMode::kClear);
+ cc::PaintFlags clear_flags;
+ clear_flags.setAntiAlias(true);
+ clear_flags.setBlendMode(SkBlendMode::kClear);
const int circle_x = base::i18n::IsRTL() ? 0 : gfx::kFaviconSize;
icon_canvas.DrawCircle(gfx::PointF(circle_x, gfx::kFaviconSize),
- kIndicatorCropRadius, clear_paint);
+ kIndicatorCropRadius, clear_flags);
canvas->DrawImageInt(gfx::ImageSkia(icon_canvas.ExtractImageRep()), 0, 0,
favicon_draw_bounds.width(),
favicon_draw_bounds.height(), favicon_draw_bounds.x(),
@@ -1373,16 +1373,16 @@ void Tab::PaintPinnedTabTitleChangedIndicatorAndIcon(
// Draws the actual pinned tab title changed indicator.
const int kIndicatorRadius = 3;
- cc::PaintFlags indicator_paint;
- indicator_paint.setColor(GetNativeTheme()->GetSystemColor(
+ cc::PaintFlags indicator_flags;
+ indicator_flags.setColor(GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_ProminentButtonColor));
- indicator_paint.setAntiAlias(true);
+ indicator_flags.setAntiAlias(true);
const int indicator_x = GetMirroredXWithWidthInView(
favicon_bounds_.right() - kIndicatorRadius, kIndicatorRadius * 2);
const int indicator_y = favicon_bounds_.bottom() - kIndicatorRadius;
canvas->DrawCircle(gfx::Point(indicator_x + kIndicatorRadius,
indicator_y + kIndicatorRadius),
- kIndicatorRadius, indicator_paint);
+ kIndicatorRadius, indicator_flags);
}
void Tab::PaintIcon(gfx::Canvas* canvas) {
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698