Bug 97666 - avoid pointless pull & push of bitmaps
Summary: avoid pointless pull & push of bitmaps
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.1
Keywords:
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2016-02-08 23:24 UTC by Michael Meeks
Modified: 2016-10-25 19:11 UTC (History)
2 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 Michael Meeks 2016-02-08 23:24:34 UTC
Currently when we create an AlphaMask we do some crazy conversion to 8bit grey of the mask bitmap:

AlphaMask::AlphaMask( const Bitmap& rBitmap ) :
    Bitmap( rBitmap )
{
    if( !!rBitmap )
        Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );

This can do some surprising things such as acquiring the buffer, pulling the pixels from GPU to CPU and ... other craziness (in a GL world) =)

We should avoid doing all that by having an efficient impl. in the backend, that at least for the common-case avoids this.
Comment 1 Commit Notification 2016-02-09 08:42:27 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#97666 -opengl: convert the bitmap to 8bit grays using GL shader

It will be available in 5.2.0.

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 2 Commit Notification 2016-02-09 11:50:33 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf546575116f7f67fe12a735bf8c8689a65bfdc1&h=libreoffice-5-1

tdf#97666 - opengl: convert the bitmap to 8bit grays using GL shader

It will be available in 5.1.1.

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 3 Michael Meeks 2016-02-09 11:56:59 UTC
Thanks Tomaz =)