Bug 38844 - Reduce XOR rendering (search RasterOp::Xor)
Summary: Reduce XOR rendering (search RasterOp::Xor)
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: dipamt1729
URL:
Whiteboard: reviewed:2022
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2011-06-30 09:39 UTC by Björn Michaelsen
Modified: 2023-02-02 06:07 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-06-30 09:39:36 UTC
Reduce XOR rendering

Background: Back in the stone age, a fast way to do masking was to XOR render a rectangular texture onto the screen, then draw a shape on it in black; then re-XOR render the texture rectangle - thus removing it everywhere except where the shape was drawn: bingo, a filled shape. Unfortunately, this works really very poorly on modern graphics hardware, cannot be anti-aliased etc. So - it would be great to go through the code (search ROP_XOR) and re-work code portions to render an alpha mask, that can be rendered with instead - for eg. complex gradient cases etc. Some ROP_XOR invocations are still needed for legacy meta-files though, avoid poking them. In some cases these have already been special cased for Mac (no XOR mode), which should mostly be a matter of simply using the Mac conditional everywhere.

Skills: C++, graphics etc
Comment 1 Florian Reisinger 2012-05-18 09:00:40 UTC
Deteted "Easyhack" from summary
Comment 2 Björn Michaelsen 2013-10-04 18:47:07 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 3 Commit Notification 2014-03-28 11:59:21 UTC
Krisztian Pinter committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=06db1edf617b537d774f487e0ab7d3528c5626df

fdo#38844 Remove XOR rendering code from canvas module



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Chris Sherlock 2014-04-07 07:00:04 UTC
I've made a change to vcl/source/gdi/outdev4.cxx around gradient clipping:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8659d189ec04aca78c8ffff97fcca507ca0a9ec3

I check have seperated out XOR clipping for gradients into ClipAndDrawGradient and XORClipAndDrawGradient. 

Possibly we can mark the XORClipAndDrawGradient as deprecated and remove it eventually. I did this change without knowing about this bug, btw :-)
Comment 5 Commit Notification 2014-04-12 18:17:14 UTC
Chris Sherlock committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb5c7d6a79309236d4f19bb2498f2e850f735a2f

fdo#38844 Reduce XOR clipping for gradients



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Stefan Weiberg 2014-09-08 08:20:00 UTC
Is this EasyHack resolved and fixed?
Comment 7 tommy27 2015-10-15 05:38:40 UTC
(In reply to Stefan Weiberg from comment #6)
> Is this EasyHack resolved and fixed?

please answer
Comment 8 Tor Lillqvist 2015-10-15 06:31:21 UTC
Read what the initial comment says. "search ROP_XOR". Do you find any?
Comment 9 tommy27 2015-10-15 08:43:03 UTC
I don't know. I'm not a developer and I don't understand anything about the code.

I just wondered if the work was done in this area or if it's still a work in progress easy hack just like tehe "remove genrman comments" thing
Comment 10 Tor Lillqvist 2015-10-15 08:51:02 UTC
There are still ROP_XORs in the code, so I would assume this is not fixed.
Comment 11 Robinson Tryon (qubit) 2015-12-14 06:31:59 UTC Comment hidden (obsolete)
Comment 12 Robinson Tryon (qubit) 2016-02-18 14:51:39 UTC Comment hidden (obsolete)
Comment 13 charan 2016-12-13 05:46:03 UTC
i want to work on this
Comment 14 jani 2017-01-13 08:02:18 UTC Comment hidden (obsolete)
Comment 15 charan 2017-01-15 04:09:06 UTC
(In reply to jan iversen from comment #14)
> A polite ping, still working on this bug ?

yes
Comment 16 Naeil ZOUEIDI 2017-06-20 12:07:38 UTC
Another polite ping, @charan, still working on it?
Comment 17 Ashis Paul 2018-03-02 09:38:42 UTC
I am assigned to this bug but I have no idea about the source code. Can anyone help me with the bug details and master code?
Comment 18 Xisco Faulí 2018-04-02 02:26:12 UTC Comment hidden (obsolete)
Comment 19 Xisco Faulí 2018-05-03 02:38:49 UTC
A polite ping, still working on this bug?
Comment 20 Xisco Faulí 2018-06-03 02:39:21 UTC Comment hidden (obsolete)
Comment 21 Xisco Faulí 2018-07-04 02:45:28 UTC Comment hidden (obsolete)
Comment 22 Xisco Faulí 2018-08-04 02:36:55 UTC Comment hidden (obsolete)
Comment 23 Xisco Faulí 2018-09-04 02:51:20 UTC Comment hidden (obsolete)
Comment 24 Xisco Faulí 2018-10-05 02:50:31 UTC Comment hidden (obsolete)
Comment 25 Xisco Faulí 2018-11-05 03:41:15 UTC Comment hidden (obsolete)
Comment 26 Xisco Faulí 2018-12-06 03:56:14 UTC Comment hidden (obsolete)
Comment 27 Xisco Faulí 2019-01-06 04:17:36 UTC Comment hidden (obsolete)
Comment 28 Xisco Faulí 2019-02-06 03:48:42 UTC Comment hidden (obsolete)
Comment 29 Xisco Faulí 2019-03-09 03:39:37 UTC Comment hidden (obsolete)
Comment 30 Xisco Faulí 2019-03-10 03:17:17 UTC Comment hidden (obsolete)
Comment 31 Xisco Faulí 2019-06-10 14:52:14 UTC
Dear Ashis Paul,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 32 oo.o+libreoffice 2019-07-22 11:13:02 UTC
Hello,

I did a search with
grep -ri ROP_XOR .
and got no hit.
See the original ticket description (https://bugs.documentfoundation.org/show_bug.cgi?id=38844#c0).
Comment 33 Tomaz Vajngerl 2019-07-22 12:08:58 UTC
(In reply to oo.o+libreoffice from comment #32)
> Hello,
> 
> I did a search with
> grep -ri ROP_XOR .
> and got no hit.
> See the original ticket description
> (https://bugs.documentfoundation.org/show_bug.cgi?id=38844#c0).

That's because ROP_XOR was changed to RasterOp::Xor

The issue is definitely not resolved yet... unfortunately.
Comment 34 Hossein 2022-06-16 13:54:55 UTC
Re-evaluating the EasyHack in 2022

This enhancement is still relevant. Searching for RasterOp::Xor gives several (38) results.
Comment 35 dipamt1729 2023-02-02 06:07:22 UTC
I would like to work on this issue.