dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 92309] Box drawn around cursor in multiple 3D games
Date: Wed, 02 Dec 2015 17:16:35 +0000	[thread overview]
Message-ID: <bug-92309-502-beSm2HS5Kg@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-92309-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 1334 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=92309

--- Comment #19 from Kamil Páral <kamil.paral@gmail.com> ---
I believe you can automatically detect invalid input in some cases. If you
receive an image in which R or G or B value is higher than A value, for any
available pixel, you can be certain that the image does not have premultiplied
alpha but straight alpha (this situation can never happen with premultiplied
alpha, by definition). You can then assume a developer mistake and "fix" the
image automatically. It might even resolve most of the usual cursor-related
mistakes (we can clearly see colored boxes, while it's expected to be
transparent, so those images have RGB>A for some pixels).

However, this has downsides as well. It does not cover all cases (for images
where all RGB are lower or equal to their respective A, you can't decide
whether it is premultiplied or straight). The automatic detection and
conversion might involve some performance hit. And it might not be a good API
design, because trying to be overly helpful often leads to lowered
predictability and more difficult debugging. But that would be someone else's
call.

I might also be talking utter nonsense because I have no expertise in graphics.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2125 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-12-02 17:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06  2:16 [Bug 92309] Box drawn around cursor in multiple 3D games bugzilla-daemon
2015-10-06  2:16 ` bugzilla-daemon
2015-10-06  2:17 ` bugzilla-daemon
2015-10-06  2:21 ` bugzilla-daemon
2015-10-06  2:48 ` bugzilla-daemon
2015-10-06  2:49 ` bugzilla-daemon
2015-10-06  2:56 ` bugzilla-daemon
2015-10-21  6:04 ` bugzilla-daemon
2015-10-25 10:19 ` bugzilla-daemon
2015-10-25 10:20 ` bugzilla-daemon
2015-10-25 10:21 ` bugzilla-daemon
2015-10-27  6:23 ` bugzilla-daemon
2015-10-27  8:37 ` bugzilla-daemon
2015-12-01 15:10 ` bugzilla-daemon
2015-12-01 15:36 ` bugzilla-daemon
2015-12-02  2:45 ` bugzilla-daemon
2015-12-02  4:48 ` bugzilla-daemon
2015-12-02 15:27 ` bugzilla-daemon
2015-12-02 15:42 ` bugzilla-daemon
2015-12-02 16:17 ` bugzilla-daemon
2015-12-02 17:16 ` bugzilla-daemon [this message]
2016-07-15 14:03 ` bugzilla-daemon
2016-07-15 14:09 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-92309-502-beSm2HS5Kg@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox