Commit 0a00b236 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Align the loading animation to pixel bounds

This is done by disabling anti aliasing. As we're painting a single
solid rectangle this is equivalent (and probably marginally faster).

Bug: chromium:907641
Change-Id: I05dec569b963511ce87f0a24d0f2f443fa0d9889
Reviewed-on: https://chromium-review.googlesource.com/c/1352338Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611380}
parent afad6853
......@@ -339,7 +339,8 @@ void TabIcon::PaintLoadingProgressIndicator(gfx::Canvas* canvas,
cc::PaintFlags flags;
flags.setColor(color);
flags.setStyle(cc::PaintFlags::kFill_Style);
flags.setAntiAlias(true);
// Disable anti-aliasing to effectively "pixel align" the rectangle.
flags.setAntiAlias(false);
flags.setAlpha(animation_state_.loading_progress_alpha);
canvas->DrawRect(bounds, flags);
......
......@@ -222,7 +222,8 @@ GFX_EXPORT void PaintNewThrobberWaiting(Canvas* canvas,
cc::PaintFlags flags;
flags.setColor(color);
flags.setStyle(cc::PaintFlags::kFill_Style);
flags.setAntiAlias(true);
// Disable anti-aliasing to effectively "pixel align" the rectangle.
flags.setAntiAlias(false);
// Draw with circular end caps.
canvas->DrawRect(bounds, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment