Bug 38844 - Reduce XOR rendering
Summary: Reduce XOR rendering
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Drawing (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: EasyHack DifficultyBeginner SkillCpp ...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 09:39 UTC by Björn Michaelsen
Modified: 2014-09-08 08:20 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

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?


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.