commit | 48d26c3d8f9f81fe52e33abe390ba235e42b65bf | [log] [tgz] |
---|---|---|
author | Michael Spang <spang@chromium.org> | Wed Jul 25 20:39:58 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jul 25 20:39:58 2018 |
tree | 929524e89f10bd38faf07f14b1e3feeaca267790 | |
parent | 5b5dc1659e61ad62aa327506c5be30c9d49df10b [diff] |
Revert "Set correct pixel size for the compositor" This reverts commit c1a826ab79d4303ddd87bbbf4f6d38995c4bcd36. Reason for revert: Screen stops updating on some devices with non default scale factor Bug: 866010 Original change's description: > Set correct pixel size for the compositor > > Right now we clip(GL_SCISSOR) the display buffer based on the physical > pixel size of the display. The pixel size we send to the ui compositor > is the size we receive from the platform window(the display in Chrome > OS). However, this may not be what we want if the platform has some > fractional scale applied. > > UI elements have their sizes set in DIP. If some UI element (ui::Layer) > has its size set to the DIP size of the display, their scaled size > (the pixel size after applying device scale factor) after rounding may > not match the physical pixel size of the display. This difference may > lead to 1px lines left unclipped. This happens in the case of the shelf > whose width is set to the width of the display. For a device like eve > where the internal display has a physical resolution width of 2400px, > if a device scale of 1.8 is applied, the DIP width of the display > becomes 1333. We set the bounds of the shelf to this. Now when we do > the actual paint, we scale the shelf to its physical pixel size which > is ROUND(1333*1.8) = 2399. At the same time the compositor will clip > things at width 2400. This difference is what gives the shelf a 1px > gap. > > A proper way to fix this is to scale ui::Layer bounds such that it > snaps to the parent's or displays edge similar to what pixel canvas > does in views::View. However, that is a large change. In the meantime > this patch sets the correct physical pixel size for the compositor so > that correct clipping happens. > > Bug: 843354 > Change-Id: Ic9e055c0ba39d85a7297809baf946398bf09f40a > Component: UI compositor, pixel canvas, scaling, HiDPI > Reviewed-on: https://chromium-review.googlesource.com/1130495 > Reviewed-by: Mitsuru Oshima <oshima@chromium.org> > Reviewed-by: Nico Weber <thakis@chromium.org> > Commit-Queue: Malay Keshav <malaykeshav@chromium.org> > Cr-Commit-Position: refs/heads/master@{#575402} TBR=oshima@chromium.org,thakis@chromium.org,malaykeshav@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 843354 Change-Id: If6d8e5649f37ec2cece1411419ca2db61daf06c8 Reviewed-on: https://chromium-review.googlesource.com/1150251 Reviewed-by: Michael Spang <spang@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#578042}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .