solid_color_layer is smaller than texture layer when fractional scale is applied |
||
Issue descriptionLooks like they uses different rounding logic, which results in issue like this crbug.com/884889. dcastagna@ do you know where they're convered to dp to pixels size?
,
Oct 30
Thanks. This is P2 because we have a workaround. Let's look at it after we finished performance work for 71.
,
Oct 30
Just FYI: here is repro step. 1) Revert backdrop_controller in this CL (crrev.com/c/1304973), if it's landed. 2) Open one browser window. 3) Start shortcut viewer (ctrl-alt-/) 4) Switch to tablet mode. You can see the gap on the right side. The backdrop uses solid color with the same size as the browser window behind it.
,
Oct 31
Texture and solid colors quads seems to use different ways of ending up on screen. Solid colors pass the rect in content space as uniform to the vertex shader (SetShaderQuadF(local_quad) in GLRenderer::DrawSolidColorQuad), and a matrix that contains the device scale factor (look at SetShaderMatrix in GLRenderer::DrawSolidColorQuad). Texture quads end up batched together if possible. For each quad they compute a transform matrix that scales and translates a predefined quad of size 1,1 to its final position on screen. The scaling happens centered on the quad at position .5, .5 and then the translation is applied. Look at |quad_rect_matrix| in GLRenderer::EnqueueTextureQuad to see how the matrix is computed. It uses QuadRectTransform to get the matrix for a given quad. I can imaging these two different computations producing different results. I'm not quite sure yet what the intended behavior is when we are on a device where the device scale factor doesn't fit an integer number of time on one of the screen side number of pixels. As mentioned before, on a 2000 pixel wide screen with a 2.25 dsf, I see a full screen quad with width 888 in content space, that ends up with the right vertex in 888*2.25, that is 1998, to screen space. |
||
►
Sign in to add a comment |
||
Comment 1 by dcasta...@chromium.org
, Oct 30