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

Unified Diff: ash/magnifier/partial_magnification_controller.cc

Issue 2679423002: ash: 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 | « ash/laser/laser_pointer_view.cc ('k') | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/magnifier/partial_magnification_controller.cc
diff --git a/ash/magnifier/partial_magnification_controller.cc b/ash/magnifier/partial_magnification_controller.cc
index b4fc5c022fa22ba89eddc2c6587d629a0516d287..b167ec595e14233a86a38efbbbbcaf813e4c7b16 100644
--- a/ash/magnifier/partial_magnification_controller.cc
+++ b/ash/magnifier/partial_magnification_controller.cc
@@ -105,14 +105,14 @@ class PartialMagnificationController::ContentMask : public ui::LayerDelegate {
void OnPaintLayer(const ui::PaintContext& context) override {
ui::PaintRecorder recorder(context, layer()->size());
- cc::PaintFlags paint;
- paint.setAlpha(255);
- paint.setAntiAlias(true);
+ cc::PaintFlags flags;
+ flags.setAlpha(255);
+ flags.setAntiAlias(true);
// Stroke is used for clipping the border which consists of the rendered
// border |kBorderSize| and the magnifier shadow |kShadowThickness| and
// |kShadowOffset|.
- paint.setStrokeWidth(kBorderSize + kShadowThickness + kShadowOffset);
- paint.setStyle(is_border_ ? cc::PaintFlags::kStroke_Style
+ flags.setStrokeWidth(kBorderSize + kShadowThickness + kShadowOffset);
+ flags.setStyle(is_border_ ? cc::PaintFlags::kStroke_Style
: cc::PaintFlags::kFill_Style);
// If we want to clip the magnifier zone use the magnifiers radius.
@@ -123,7 +123,7 @@ class PartialMagnificationController::ContentMask : public ui::LayerDelegate {
int clipping_radius = kMagnifierRadius;
if (is_border_)
clipping_radius += (kShadowThickness + kShadowOffset + kBorderSize) / 2;
- recorder.canvas()->DrawCircle(rect.CenterPoint(), clipping_radius, paint);
+ recorder.canvas()->DrawCircle(rect.CenterPoint(), clipping_radius, flags);
}
void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {}
@@ -159,41 +159,41 @@ class PartialMagnificationController::BorderRenderer
ui::PaintRecorder recorder(context, magnifier_window_bounds_.size());
// Draw the shadow.
- cc::PaintFlags shadow_paint;
- shadow_paint.setAntiAlias(true);
- shadow_paint.setColor(SK_ColorTRANSPARENT);
- shadow_paint.setLooper(
+ cc::PaintFlags shadow_flags;
+ shadow_flags.setAntiAlias(true);
+ shadow_flags.setColor(SK_ColorTRANSPARENT);
+ shadow_flags.setLooper(
gfx::CreateShadowDrawLooperCorrectBlur(magnifier_shadows_));
gfx::Rect shadow_bounds(magnifier_window_bounds_.size());
recorder.canvas()->DrawCircle(
shadow_bounds.CenterPoint(),
shadow_bounds.width() / 2 - kShadowThickness - kShadowOffset,
- shadow_paint);
+ shadow_flags);
- cc::PaintFlags border_paint;
- border_paint.setAntiAlias(true);
- border_paint.setStyle(cc::PaintFlags::kStroke_Style);
+ cc::PaintFlags border_flags;
+ border_flags.setAntiAlias(true);
+ border_flags.setStyle(cc::PaintFlags::kStroke_Style);
// The radius of the magnifier and its border.
const int magnifier_radius = kMagnifierRadius + kBorderSize;
// Draw the inner border.
- border_paint.setStrokeWidth(kBorderSize);
- border_paint.setColor(kBorderColor);
+ border_flags.setStrokeWidth(kBorderSize);
+ border_flags.setColor(kBorderColor);
recorder.canvas()->DrawCircle(magnifier_window_bounds_.CenterPoint(),
magnifier_radius - kBorderSize / 2,
- border_paint);
+ border_flags);
// Draw border outer outline and then draw the border inner outline.
- border_paint.setStrokeWidth(kBorderOutlineThickness);
- border_paint.setColor(kBorderOutlineColor);
+ border_flags.setStrokeWidth(kBorderOutlineThickness);
+ border_flags.setColor(kBorderOutlineColor);
recorder.canvas()->DrawCircle(
magnifier_window_bounds_.CenterPoint(),
- magnifier_radius - kBorderOutlineThickness / 2, border_paint);
+ magnifier_radius - kBorderOutlineThickness / 2, border_flags);
recorder.canvas()->DrawCircle(
magnifier_window_bounds_.CenterPoint(),
magnifier_radius - kBorderSize + kBorderOutlineThickness / 2,
- border_paint);
+ border_flags);
}
void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override {}
« no previous file with comments | « ash/laser/laser_pointer_view.cc ('k') | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698