Bug 55310 - incorrect rendering of some borders in certain gtk3 themes
Summary: incorrect rendering of some borders in certain gtk3 themes
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 41133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-25 09:34 UTC by Sebastian Keller
Modified: 2012-09-26 16:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot showing the problem (15.97 KB, image/png)
2012-09-25 09:34 UTC, Sebastian Keller
no flags Details
Patch to fix the issue (1.70 KB, patch)
2012-09-25 09:37 UTC, Sebastian Keller
no flags Details | Splinter Review

Description Sebastian Keller 2012-09-25 09:34:00 UTC
Created attachment 67669 [details]
Screenshot showing the problem

When using a gtk3 theme that uses "border-image" with the "stretch" as repeat mode (such as Adwaita, the default theme), gtk3 uses cairo to scale the image. When using the "image" backend of cairo everything looks as expected. Using the X backend on a "intel" driver should work as well (as I'm told). But using the "nouveau" driver gives some fading out borders.

After changing NV50EXAPictTexture to use CLAMP_TO_EDGE for RepeatPad like the intel driver does (http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/i915_render.c?id=c6008068372709c73034163eddc902b47bf87d24#n327) the result looks like the one rendered with the "image" backend.

I'm attaching the patch and a screenshot that shows the rendering issue, how it looks with the image backend and after the patch.

For the screenshot I've made the top right pixel in the top border red (#ff0000). In the first screenshot you can see how the color "fades away" because it gets blended with some transparent pixels when scaled. In the second and third screenshot the rightmost pixel before the corner is #ff0000.

I've only tested the patch for nv50 but the nv40 one should work as well if the defines are correct.
Comment 1 Sebastian Keller 2012-09-25 09:37:57 UTC
Created attachment 67670 [details] [review]
Patch to fix the issue
Comment 2 Ben Skeggs 2012-09-26 01:21:22 UTC
Thanks for the patch, I modified it slightly to fix nvc0_exa.c in the same way and pushed it to git!
Comment 3 Rui Tiago Matos 2012-09-26 16:20:47 UTC
*** Bug 41133 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.