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

Unified Diff: ui/views/animation/ink_drop_painted_layer_delegates.cc

Issue 2680943002: ui: Clean up naming of paint-related identifiers (Closed)
Patch Set: 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 | « ui/views/animation/ink_drop_mask.cc ('k') | ui/views/border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_painted_layer_delegates.cc
diff --git a/ui/views/animation/ink_drop_painted_layer_delegates.cc b/ui/views/animation/ink_drop_painted_layer_delegates.cc
index 4612abdf960e262222714f884a5f7154915d58a3..388fa7b8dedfcdef705b06a54be3e8663f614425 100644
--- a/ui/views/animation/ink_drop_painted_layer_delegates.cc
+++ b/ui/views/animation/ink_drop_painted_layer_delegates.cc
@@ -58,15 +58,15 @@ gfx::Rect CircleLayerDelegate::GetPaintedBounds() const {
}
void CircleLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- cc::PaintFlags paint;
- paint.setColor(color());
- paint.setAntiAlias(true);
- paint.setStyle(cc::PaintFlags::kFill_Style);
+ cc::PaintFlags flags;
+ flags.setColor(color());
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, GetPaintedBounds().size());
gfx::Canvas* canvas = recorder.canvas();
- canvas->DrawCircle(GetPaintedBounds().CenterPoint(), radius_, paint);
+ canvas->DrawCircle(GetPaintedBounds().CenterPoint(), radius_, flags);
}
////////////////////////////////////////////////////////////////////////////////
@@ -84,14 +84,14 @@ gfx::Rect RectangleLayerDelegate::GetPaintedBounds() const {
}
void RectangleLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- cc::PaintFlags paint;
- paint.setColor(color());
- paint.setAntiAlias(true);
- paint.setStyle(cc::PaintFlags::kFill_Style);
+ cc::PaintFlags flags;
+ flags.setColor(color());
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, size_);
gfx::Canvas* canvas = recorder.canvas();
- canvas->DrawRect(GetPaintedBounds(), paint);
+ canvas->DrawRect(GetPaintedBounds(), flags);
}
////////////////////////////////////////////////////////////////////////////////
@@ -115,13 +115,13 @@ gfx::Rect RoundedRectangleLayerDelegate::GetPaintedBounds() const {
void RoundedRectangleLayerDelegate::OnPaintLayer(
const ui::PaintContext& context) {
- cc::PaintFlags paint;
- paint.setColor(color());
- paint.setAntiAlias(true);
- paint.setStyle(cc::PaintFlags::kFill_Style);
+ cc::PaintFlags flags;
+ flags.setColor(color());
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
ui::PaintRecorder recorder(context, size_);
- recorder.canvas()->DrawRoundRect(GetPaintedBounds(), corner_radius_, paint);
+ recorder.canvas()->DrawRoundRect(GetPaintedBounds(), corner_radius_, flags);
}
////////////////////////////////////////////////////////////////////////////////
@@ -153,10 +153,10 @@ gfx::Vector2dF BorderShadowLayerDelegate::GetCenteringOffset() const {
}
void BorderShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
- cc::PaintFlags paint;
- paint.setStyle(cc::PaintFlags::kFill_Style);
- paint.setAntiAlias(true);
- paint.setColor(fill_color_);
+ cc::PaintFlags flags;
+ flags.setStyle(cc::PaintFlags::kFill_Style);
+ flags.setAntiAlias(true);
+ flags.setColor(fill_color_);
gfx::RectF rrect_bounds =
gfx::RectF(bounds_ - GetPaintedBounds().OffsetFromOrigin());
@@ -165,13 +165,13 @@ void BorderShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
// First the fill color.
ui::PaintRecorder recorder(context, GetPaintedBounds().size());
- recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint);
+ recorder.canvas()->sk_canvas()->drawRRect(r_rect, flags);
// Now the shadow.
- paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_));
+ flags.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_));
recorder.canvas()->sk_canvas()->clipRRect(r_rect, SkClipOp::kDifference,
true);
- recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint);
+ recorder.canvas()->sk_canvas()->drawRRect(r_rect, flags);
}
} // namespace views
« no previous file with comments | « ui/views/animation/ink_drop_mask.cc ('k') | ui/views/border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698