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

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

Issue 2085673004: Fix tab strip rendering at non-integral scale factors in MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 6 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/frame/browser_view.cc ('k') | no next file » | 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 074495d401500b1416437c62f89643fa63176765..2a7aedc4eab57f351cb3217f2dc667613e40ab8d 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1656,7 +1656,9 @@ void Tab::ScheduleIconPaint() {
void Tab::GetFillPath(float scale, SkPath* fill) const {
const float right = width() * scale;
- const float bottom = height() * scale;
+ // The bottom of the tab needs to be pixel-aligned or else when we call
+ // ClipPath with anti-aliasing enabled it can cause artifacts.
+ const float bottom = std::ceil(height() * scale);
const float unscaled_endcap_width = GetUnscaledEndcapWidth();
fill->moveTo(right - 1, bottom);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698