Commit 51706e1c authored by Malay Keshav's avatar Malay Keshav Committed by Commit Bot

Use paint recording scale factor instead of device scale factor

The paint recording scale factor is set to 1 when pixel canvas is
disabled. We cannot use the value of PaintContext::device_scale_factor
for the recording scale factor in such cases.

Bug: 813463
Change-Id: If51bfde2e271ce863cf3971016ee6347cbce592a
Component: Tabs, Clipping, Scaling
Reviewed-on: https://chromium-review.googlesource.com/927182Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537876}
parent 06d2bd76
...@@ -611,9 +611,10 @@ void Tab::PaintChildren(const views::PaintInfo& info) { ...@@ -611,9 +611,10 @@ void Tab::PaintChildren(const views::PaintInfo& info) {
// except when the tab is too narrow to completely show even one icon, at // except when the tab is too narrow to completely show even one icon, at
// which point this serves to clip the favicon. // which point this serves to clip the favicon.
ui::ClipRecorder clip_recorder(info.context()); ui::ClipRecorder clip_recorder(info.context());
clip_recorder.ClipPathWithAntiAliasing( // The paint recording scale for tabs is consistent along the x and y axis.
GetInteriorPath(info.context().device_scale_factor(), size(), const float paint_recording_scale = info.paint_recording_scale_x();
GetTabEndcapWidth(), 1 /* padding */)); clip_recorder.ClipPathWithAntiAliasing(GetInteriorPath(
paint_recording_scale, size(), GetTabEndcapWidth(), 1 /* padding */));
View::PaintChildren(info); View::PaintChildren(info);
} }
......
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