summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2019-11-27implement SalROPColor in SkiaLuboš Luňák
Pretty much copy&pasted from other VCL plugins ... whatever is actually is. Change-Id: Ibdd5d6d2106f303127afbbde45d400d02a5de93b
2019-11-27extend vcl backendtest to more backendsLuboš Luňák
At least the KF5/Qt5 VCL plugins passes fine. Change-Id: I033ddf6ae9cc663729ca459cdc514dc0fa51ddc2
2019-11-27fix debug buildLuboš Luňák
Change-Id: Ia6d5545ef088604f3fe104b00cc86a45d91f6559
2019-11-27skia: drawMask can be simplified with drawBitmap callTomaž Vajngerl
Change-Id: Ie01c9dba1287495db9f176c1e1e25799e5f3e872
2019-11-27skia: add common function to check the input SalTwoRectsTomaž Vajngerl
function is checkInvalidSourceOrDestination Change-Id: Id3b5dc69a3949f01b5335a9bdf0ce0ad165adab1
2019-11-27skia: use a common drawBitmap in more casesTomaž Vajngerl
Add an additional parameter to drawBitmap - blend mode, so we can also use the same bitmap drawing code for blendBitmap. Change-Id: Iaa0aff6724c6644d80056097e7477b31c8412b29
2019-11-27skia: implement blendAlphaBitmap and blendBitmapTomaž Vajngerl
Change-Id: I83f33795bea5ed72f1f3269f30f64b1b24566538
2019-11-27skia: don't loop to first point if the polygon is not closedTomaž Vajngerl
This fixes drawing of non-closed polylines. Without this fix the non-closed polylines an extra step is still drawn from the last point in the polygon to the first one (as if the polyline would be closed). Change-Id: I0171aede3dc03f83b7dd8ae699e6b505b3fd4f7f
2019-11-27backendtest: test blending of bitmapTomaž Vajngerl
This forces a blending of an alpha virtualdevice with a BitmapEx which has an alpha component. This tries a fast-path with using blendAlphaBitmap in the backend and does blending manually and slower if the fast-path is not available. Change-Id: I7e45dc78ce3e61ede408aa8388802a193cbc577a
2019-11-27backendtest: support creating VirtualDevice with alphaTomaž Vajngerl
Change-Id: I74c428b9b31b89536e72d53e418fc11b3f7e4e32
2019-11-27make Skia use AA when asked forLuboš Luňák
This improves the quality of e.g. the logo in the about dialog. Change-Id: Ie42ecc466068f979e5982d91616a8a2f80e26319
2019-11-27mark a local function staticLuboš Luňák
Change-Id: I3856aa76e0280f4798893e02efd2b458cd95e65f
2019-11-27implement Skia native controls drawing/caching for WindowsLuboš Luňák
This actually fixes a number of drawing problems (e.g. highlight in popup menus), it seems the other code path is buggy. Change-Id: Iea697f577d08d20e338224d5ff5b3bf7b653f8d1
2019-11-27remove unwanted debug dumpLuboš Luňák
Change-Id: I1cbda292155e251e2d0900f00f804f01238998ed
2019-11-27fix SkiaSalGraphicsImpl::drawPixel()Luboš Luňák
Change-Id: I2fa0853ba2593583a479747460f77f2ced67fd6a
2019-11-27hopefully finally fix SkiaSalGraphicsImpl::drawMask()Luboš Luňák
It now passes BackendTest::testDrawMask, so it should be checked. Change-Id: Ib3e1df03aefe6e9487737bec036a943377414735
2019-11-27temporarily disable failing tests in visualbackendtestLuboš Luňák
These should get fixed, but no point in having tests that already fail without breaking anything. Change-Id: Ibfa48fc22a4be1d76924d61a7dc223a56f64244b
2019-11-27use SkPath::kEvenOdd_FillType for polypolygon paths in SkiaLuboš Luňák
Apparently that is the rule LO code uses, seeing e.g. the last screen in visualbackendtest. Change-Id: I88da7e96df9748cc6ffb3fbb6901512f59210cab
2019-11-27restore canvas state in SkiaSalGraphicsImpl::drawTransformedBitmap()Luboš Luňák
Otherwise the transformation stays set on the canvas also for further operations. Change-Id: Ibcb8480a74dd7da880bbc83cb186dabe06394fe9
2019-11-27add a TODO note about Skia Vulkan surface getting recreated too oftenLuboš Luňák
Change-Id: I558c5c161224e5ba5835fb5ec994e585c90ec14c
2019-11-27work around for Skia SkCanvas::clipRegion() bugLuboš Luňák
https://bugs.chromium.org/p/skia/issues/detail?id=9580 Change-Id: I37b7f5bd8c9b6a4a4d96a4c694dd3ad238b29f69
2019-11-27add Skia VCL README with some basic informationLuboš Luňák
Change-Id: Ifff230ce76b4b33cd91322e564be1685afea763f
2019-11-27default to Skia using Vulkan, use SAL_SKIA=raster to use rasterLuboš Luňák
Change-Id: I5969b0672cdbb54e60b861bac102191dad6a4caf
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