summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2019-11-27more safe handling of destroying Skia surfaces/contextsLuboš Luňák
As the comment in SkiaSalGraphicsImpl::destroySurface() says, they may both refer to each other's data when being destroyed, so try to handle that. Change-Id: I44353ed9d1888f8e8d15d93cd2c66414adfd372b
2019-11-27fix Skia Windows text renderingLuboš Luňák
There are two cases in WinSalGraphics::DrawTextLayout(), with and without cached glyphs: - Cached case DeferredTextDraw() gets data as BGRA with the glyph drawn in white, it just needs to be modulated to the proper color and drawn. - Uncached case DrawTextMask() gets data as BGRA with A invalid, it must be used as mask for the color to drawn, but without the inverse alpha VCL idiosyncracy that DrawMask() handles. Change-Id: I05dcec994df68d5986cd85cffa42a8f9f23c42c4
2019-11-27fix SkiaSalGraphicsImpl::drawMask()Luboš Luňák
Now that SalBitmap::convertDataBitCount() has been fixed, the implementation here gets rather trivial. This breaks Windows text drawing, which uses drawMask() incorrectly (to be fixed in the next commit). Change-Id: I98f11c1bd4b1600bb5e03e570319d29b40daa27e
2019-11-27skip text drawing if there is nothing to drawLuboš Luňák
If the rectangle is empty, there is nothing to draw. This also avoids problems with WinSalVirtualDevice::ImplCreateVirDevBitmap() calling CreateDIBSection() with zero dimensions. Change-Id: I3a56e64fc32cfb855443f4ab665d53604d724d9b
2019-11-27skia: implement drawTransformedBitmapTomaž Vajngerl
But needs more testing.. Change-Id: I4767a62a725dc54800c3fb42d81769eddae4b98b
2019-11-27backendtests: add some bitmap testsTomaž Vajngerl
Change-Id: If791dd113fb484ccdd81a2ee7c1f217057a918ca
2019-11-27skia: drawAlphaRect and drawRect use common codeTomaž Vajngerl
Change-Id: Ib7fc850d024b1fc7ec0ab933842bf1868b70a6d2
2019-11-27fix alpha in SkiaSalGraphicsImpl::drawAlphaBitmap()Luboš Luňák
The mistake in SalBitmap::convertDataBitCount() made this function have 2 different results depending on whether that function was used by GetAlphaSkBitmap() or not. Now that that is fixed, it works to just handle alpha normally here. Change-Id: Iae99cbefcda0a963401baf362faaad0df12a468f
2019-11-27fix alpha conversion in SalBitmap::convertDataBitCount()Luboš Luňák
VCL sometimes uses inversed alpha, but this function should always just convert the format and not the contents. Change-Id: I85943cb8d9db6c09c57ccf8fa45e8a591db10e6d
2019-11-27fix warning from loplugin:datamembershadowLuboš Luňák
Change-Id: I1a15cf12adff559032f7737c14f56346063d0562
2019-11-27transform to device coords in Skia drawPolyPolygon()Luboš Luňák
Otherwise the logo in the about dialog is rendered outside the graphics device size. Change-Id: I610653293fccedd5d8c17f51afcdab55ada2d1d4
2019-11-27reimplement supportsOperation() for Skia and OpenGLLuboš Luňák
The shared X11 implementation depends on XRender, which doesn't make any sense. Change-Id: I82f36e0835a993a8b226af211d8635336960d7ec
2019-11-27skia: redirect drawBitmap with bitmap + mask to drawAlphaBitmapTomaž Vajngerl
Change-Id: I5dc62f9d6222447083b027d5ff3da1582ff4ef01
2019-11-27backendtests: enable tests only when render backend is skiaTomaž Vajngerl
Change-Id: Idd06da27e405a3c0040bdad69c76537f12e50c92
2019-11-27backendtest: Add polyline bezier curve backend testsTomaž Vajngerl
Change-Id: I8cb3e97de79cbd683a266b09fb7d194c07b0089f
2019-11-27backendtest: Add PolyLine B2D test diamondTomaž Vajngerl
Change-Id: I6e754e72ff698d62c493b827f9804f63d0e39e2d
2019-11-27Add getting of render backend name + impl. for skiaTomaž Vajngerl
Change-Id: Id4e32425579c2a3ebdc33e234f55a7324dbb39d4
2019-11-27finish Skia toSkRegion()Luboš Luňák
vcldemo now starts without aborting Change-Id: Ic9cd382d0f638f2040a0ac5fc204bce13f6768a9
2019-11-27note about SkiaSalBitmap::ConvertToGreyscale() not being worth itLuboš Luňák
Change-Id: I3056eea5c7b241dab566a900a3ed4b9d6daee74e
2019-11-27implement pruning in SkiaGlobalWinGlyphCacheLuboš Luňák
Currently based on identifying the SkBitmap's by their getPixels(), but this may need changed later since it's probably going to be more performant to use SkSurface. Also move the cache pruning out of AllocateTexture(), as that may possibly remove elements that would be used by DrawCachedGlyphs(). Change-Id: Ide2de752f634593b97573667af49b7aa9ec1f47f
2019-11-27skia: implement direct PolyPolygon and PolyLine renderingTomaž Vajngerl
Polygon, PolyPolygon and PolyLine rendering taking point array is diverted to the one taking basegfx::B2DPolyPolygon or B2DPolygon. PolyPolygon and PolyLine is implemented with Skia, with bezier rendering included. The one thing missing is taking the input matrix into account. Change-Id: Id675dddcef95d2279410f5987424c1de6863cbe6
2019-11-27remove some obsolete Skia TODO'sLuboš Luňák
Change-Id: I11ec226a627e98552bd35753aa5a8fbcfca66186
2019-11-27add GUI and configuration options for SkiaLuboš Luňák
Pretty much a copy&paste of OpenGL. There are no settings for choosing which backend Skia should use, as the plan is that simply the "best" one will be selected. Change-Id: I44fa876ab85de98de482a6ed9f814024334686ce
2019-11-27make Skia use either Raster or Vulkan, depending on a settingLuboš Luňák
For now default to raster, SAL_SKIA=vk switches to Vulkan. Change-Id: Ia0f3ffdd4367eac9871aa977c930c1e6029e1d25
2019-11-27delete Skia WindowContext only after the SkSurface it has createdLuboš Luňák
Because the context deletes memory that is accessed while the surface is being destroyed. Change-Id: I6f73baeb604e9ac79d6dd7eb2137791666a64712
2019-11-27allocate Skia SkSurface on demandLuboš Luňák
Since VCL seems to often do a resize between creating the SkiaSalGraphicsImpl and actually starting to draw, it's a waste to create a surface that will be immediately destroyed again. Change-Id: Ic1f67701042ccae2ad51cb9a3f8646b888f94cc4
2019-11-27resize surface in SkiaSalGraphicsImpl if neededLuboš Luňák
This is similar to what the OpenGL backend does. Apparently the VCL code can just silently resize the graphics without telling. Change-Id: Ie7c2a7798e76ad598e9cdd1435d68ed03793c408
2019-11-27update Skia to chrome-m79Luboš Luňák
Change-Id: Ie79f4752c4d0978b816774674bc923e6973289f8
2019-11-27backendtests: remove unused variable - aReturnValueTomaž Vajngerl
Change-Id: I1a2ef490ad0ae6f431f8b4c40c27c7829c51e08d
2019-11-27skia: move {to,from}SkColor to gdiimpl.cxxTomaž Vajngerl
Currently {to,from}SkColor is not used elsewhere so no need to have it defined in the header. Change-Id: I693902a876a55caead4a82982c1420d6883dd5e8
2019-11-27skia: change lclPolygonToPath to get SkPath as parameterTomaž Vajngerl
More futureproof as it can be used for adding PolyPolygon Change-Id: Ic0c32e8bf8d2189df3ee2d80fe6dc8c00ce8fcef
2019-11-27add "invert" tests to BackendTestTomaž Vajngerl
All backend tests are not enabled yet as none of the backends pass, but testDrawInvertWithRectangle and testDrawInvertN50WithRectangle should pass with skia backend. testDrawInvertTrackFrameWithRectangle is more complicated as drawing an inverted dashed frame around overshoots outside of the rectangle area (as with gtk3 backend, maybe others too). This is something we need to fix or better yet to get rid of this invert mode. Change-Id: Ibc08ff99d91014c41324b67e8e984111bcd3c7ac
2019-11-27skia: implement invert operationTomaž Vajngerl
Change-Id: I248518283ee6a4604bc45f36f2af3804a15f5652
2019-11-27fix Skia enabling (disabling and it should not be enabled by default)Luboš Luňák
Change-Id: I96bd8565a2a311d556ca96d868feccaf00a9cfe3
2019-11-27make Skia SkBitmap dumping function staticLuboš Luňák
So that it's usable also from the outside. Change-Id: I4d5184eb8a9dd452a94e5d5b7fe5ed7e329725a0
2019-11-27remove abort() from SkiaSalGraphicsImpl::invert()Luboš Luňák
This gets called during LO startup. Change-Id: I98061df91d6503100ca7edf6058d50fc529180d4
2019-11-27basic implementation of Skia text drawing on WindowsLuboš Luňák
Change-Id: If66e92aef04cd5bbeb22b8c5da65b7b9c77fed23
2019-11-27use SupportsBitmap32 also for Skia on WindowsLuboš Luňák
Change-Id: Ic40b76f152767d25c3645de2cb013c3af4ae93a4
2019-11-27refactor Windows OpenGLGlyphCache stuff to be reusable for SkiaLuboš Luňák
Basically just remove 'OpenGL' from names of most of the classes, turn them into base classes that have OpenGL subclasses that actually implement the functionality. Change-Id: Idf1f347cebc2a417bda37d6955201c775ecb0890
2019-11-27fix warningTomaž Vajngerl
Change-Id: I6f0f278bae75bb5e0cd49523b4ce6c4918092412 warning: declaration of ‘graphics’ shadows a member of ‘SkiaFlushIdle’ [-Wshadow]
2019-11-27build properly with or without Skia enabledLuboš Luňák
Change-Id: I5106f13682963b81753f79c3203d4ef7387664fe
2019-11-27disable bitmap CRC checking in SvmTest::checkBitmap(Ex)s() for SkiaLuboš Luňák
The idea itself is broken, the CRC depends on the scaling algorithm and also on the exact internal layout (and if scanlines are rounded up, the CRC also depends on random bytes). Change-Id: I800be8553c7f2afce1a4c292cd61369cde0ba6c3
2019-11-27also check rendering in SvmTest::testBitmaps()Luboš Luňák
Just like it's done in SvmTest::testBitmapExs() Change-Id: If004853aa12987eae1857c69061bdca114384942
2019-11-27initial implementation of Skia drawing on screen in WindowsLuboš Luňák
Change-Id: I1562bd2cfd1862947042bef3343aefd851a65002
2019-11-27make WinSalVirtualDevice::SetSize() always call Init() for all Impl'sLuboš Luňák
I don't see why this should be OpenGL-only. For WinSalGraphicsImpl it's a no-op anyway, and for other Impl's it may be useful to find out that they have been in fact resized. For Skia this is necessary because Init() the first time may get called with empty size. Change-Id: I4a8fa0fc633b415735d3633e89f208ab1c1f1229
2019-11-27make X11/Skia render to screen using Skia codeLuboš Luňák
Change-Id: I3056afe2ba0a15e0798d209ab9bd833c773948be
2019-11-27implement skia x11 cairo text drawingLuboš Luňák
Change-Id: Id7d29980d2ea82b98e478e24b7e3189c31fa7257
2019-11-27make the X11/Skia backend finally capable of drawing on screenLuboš Luňák
Change-Id: I5c847c1036c671137ee27053691189093b1dafae
2019-11-27correct SkPaint usage when paintingLuboš Luňák
Handle SALCOLOR_NONE properly. Also avoid reusing a global SkPaint, creating a new one is as cheap as making a copy, and this way it's less error-prone. Change-Id: I12659cdc58b02f5105029b2b89d1b0c147c7a471
2019-11-27flush SkSurface's SkCanvas before getting data from itLuboš Luňák
It seems this is necessary, otherwise there may be pending operations. Change-Id: I93650bbd622d8ab8b6535a950afd2b6ac6a87db7