Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When drawing a pixel, also the pixel above is impacted #636

Open
woutervanh opened this issue Oct 27, 2023 · 2 comments
Open

When drawing a pixel, also the pixel above is impacted #636

woutervanh opened this issue Oct 27, 2023 · 2 comments

Comments

@woutervanh
Copy link

We are running cog on a imx53, using mainline linux + freedreno / mesa.
We have an application where we need to have the output exactly as we draw it on the canvas. However there seems to be something off there. It seems that single pixels also impacts the pixel above. This is not noticeable when we take a screenshot using inspector, but is visible when we make a screenshot using weston-screenshooter. Dithering is already (hard) disabled in freedreno. We need this pixels exactly because these are interpreted by a fpga, connected via the parallel display output.

I already did some things trying to disable aliasing in webkit/cairo (as I thought that might be the culprit), but it doesn't help me out.

Does anyone has an idea?

Illustration of what I mean. Upper is as expected and exported using inspector, lower is as captured by screenshooter (and read out via fpga) Row is one pixel high:

screenshot

@woutervanh woutervanh changed the title When drawing a pixel, also the pixel above is impacted #484 When drawing a pixel, also the pixel above is impacted Oct 27, 2023
@woutervanh
Copy link
Author

woutervanh commented Nov 7, 2023

Did some further digging. It appears that also the bottom row pixel and right column pixel is not drawn, but black instead. If I draw a red box, only top and left appear. This is also the case when I put an image like that as weston background (so without cog). Only when drawing the image with cog, it also appears that thers is some colorisation on top of the normally red line (which is now black). When I move it up one pixel, so drawing a box on 1919x1079, I have the black border, the red border and the "discolorisation".

screenshot of box on 1920x1080
screenshot of box on 1919x1079
Html code I'm using:

<head>
    <meta charset="utf-8" />
    <title>Background</title>
    <style>
      * {
          margin: 0px;
          padding: 0px;
      }
 
      html {
	  height: 100%;
      }
      body {
	  width: 1920px;
          height: 1080px;
      }
 
      body {
	border: 1px solid red;
	box-sizing: border-box;
	background-color: rgb(24,182,231);
      }
    </style>
  </head>
  <body></body>
</html>

@woutervanh
Copy link
Author

I think the black row/column is not related. I'm able to "fix" the discolorisation issue by having the LIBGL_ALWAYS_SOFTWARE=1 flag set. But the black borders are still there. But these are a minor issue for me. Have to figure out why rendered by software it looks ok (though performance is a drama), and when rendered by hw, it looks bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant