Age | Commit message (Collapse) | Author |
|
The workaround breaks a valid use in tdf#134346, so the original
problem will need to be handled differently.
Change-Id: I1560ef5714a90f1d170341c1b716010a0eb5aafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97723
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: If8a088daa7971509cf12b508f956bed28a6c053b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97724
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I3af3517c9c213e0db8365aecd0a008d817ca4dcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97592
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Tdf#134363 causes OutputDevice::DrawTransformBitmapExDirect()
to create a huge 1bpp bitmap as mask, and Skia code then tries
to convert all the bits to a format Skia would understand. Which
is wasteful, as SkShader with the color given will do the same
task much more efficiently.
Change-Id: If0bba16f56fed9c3720be801b25a1e703054ed8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97488
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I52b6d9985639a6a81bf9c53bd35487b5c4992988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97485
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
The SkGraphics::Init() docs say it's called by global variable
initialization, but that doesn't seem to exist. Call it manually,
as it decides e.g. which CPU features to use.
Change-Id: I7e0e18290240ff2ae3298d5569c22f7dc083dde4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97415
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Ic77f9b8f9244e7fdaca78f91686645eee421d18f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97288
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Only the grey palette with 256 colors means that pixel values map
directly to color values. Tdf#121120 has an image with 2-bit
palette where color index 1 is (255,255,255), but that means
the pixel value 1 cannot be just treated as color.
Change-Id: Ifbd953af7f291e4fb8032ea0f4c33c0514770856
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97283
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
The only threaded one is "Super" (i.e. the default one), and Skia
at a comparable quality seems to perform better. And the code is
simpler too.
Change-Id: I366197fe1a033c1f7a5f5c7f9fdcc00bff74dc11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97278
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
EnsureBitmapData() was using Create() to make a copy of the bitmap
to scale, but the quality was not copied, so it was usually
at the default (and slowest) high quality.
Change-Id: I7100304a935db420e2d55c2a9450016be1195965
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97277
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I52849097267326cb362b113241179a766d286a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97273
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
The unnecessary initialization of all elements with plain
boost::make_shared() actually shows up in the profiler.
Change-Id: I054b13ac74362aca7f2dfa7dc746d3a80c7f1042
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97267
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
It turns out it's sometimes more efficient to use
SkCanvas::drawPaint() with SkShader::Blend() used to blend bitmaps
together, rather than manually creating temporary SkImage
for the blending. This way it saves memory and it also performs
faster e.g. for tdf#134237, where when zoomed it processes only
relevant parts of the images instead of blending a whole enlarged
image).
Sadly in raster mode it is sometimes still faster to cache
the image (e.g. with tdf#134160), so keep the caching there as well,
for when useful.
Change-Id: I887ae330907100c21a0d152783fcd7e8ef230355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97238
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Using #define's directly from VCL will report the compiler used
to compile VCL, which may be different from the one used for Skia.
Also truncate the log file on opening.
Change-Id: Iddf613613df20505f1abe1dd5468dcc8c7041410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97090
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I842b55cd922eb0e411fd7450e84224b41ba82a2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96989
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I32d9a8bf19cbff709c088c0e0a1d4830e877e88d
|
|
Change-Id: I562aae9f55701477acd6b5d2cc8a556f3449ecb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96688
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Ib2a9e4c25421c20e52ee65b2ec8fb3a190bcb75b
|
|
Non-antialised adjacent polygons line up perfectly when drawn, and
LO code assumes this is the case even when AA is enabled, which
seems to work with Cairo, but not with Skia. So add a hack.
Ideally LO code should not use such polygons.
Change-Id: Ib46139db80f7bda78fde3aac4244da391133b7cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96369
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
In debug builds this led to an assert with the bugdoc, in optimized
builds it seems to cause drawing problems.
Change-Id: Id52309f2e3d33f8b68952d988b927cea7546d131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96206
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I3d2e0f6a1f43fe44a8396b53806e2f2c59c46d6c
|
|
Related to the previous commit where I forgot to do this.
Makes a difference e.g. for
https://bugs.documentfoundation.org/show_bug.cgi?id=130478#c37
Change-Id: Id52f8db1580a78aec7c1e4764a5872f027c85a96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94874
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Makes more sense if it's disabled because the VCL backend doesn't
actually support Skia.
Change-Id: I3f14c6ae1172c0a2cba3bf19c4cb5288e214eb2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94861
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Id5efe7227f3c2bcb5ef6f1b990327e72014e8c47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94857
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Apparently even drawBitmap() may lead to image scaling.
Change-Id: I8665dfc4d12768c3824bbc45aaa72277168acc8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94781
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Do like other VCL backends do.
Change-Id: I64b5d5a2fb131b41c70aa63eaf84022e9aa9fab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94702
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
the FreetypeFont only makes sense in the context of the FreetypeFontInstance it
belongs to so remove the faux "garbage collection" and just have FreetypeFontInstance
own the FreetypeFont and keep it simple.
Setting a value low enough to make the garbage collection kick in just crasheed
libreoffice by pulling FreetypeFont out from under living FreetypeFontInstance
seeing as the Cache/Uncache was by the FreeTypeTextRenderImpl not the
FreetypeFontInstance which had HarfBuff faces which continued to point to the
removed FreetypeFont
There is still a cache at the LogicalFontInstance level, so this aligns the
libfreetype platforms with windows, mac etc.
Change-Id: Iac669fae8dc1df81a5bc10d2943d84a2ff623180
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94546
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
The image size should be part of the key.
Change-Id: I615e5d99ec347941fa06655b89902f3db84aef22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94634
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
It doesn't make much sense anymore to keep it around, it's now used
only by GetAsSkImage(), which is only called from GetSkImage() and
GetSkAlphaImage(), and it's unlikely one SkiaSalBitmap would
be used both as a bitmap and an alpha mask.
In Vulkan mode this should save the memory (in raster mode the memory
is shared by the SkImage).
Change-Id: I5818a462aca85906f2e82cd951b6241d954723c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94228
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Ia8cdd792feae51a9089badb55b8622e6b58b19a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94025
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Moving the mouse with the bug document triggers repeated calls
to drawAlphaBitmap(), which is somewhat costly if not GPU-accelerated.
Now the main cost in that bugreport is generating the frames
all over again.
Change-Id: Ic44811c713a745459f0af811c3d55038c944d89e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94152
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
E.g. scrolling in Writer with a huge image inserted requires scaling
down on every paint, so cache the result if it's expensive.
Change-Id: I9db040eab47e0e9d7fd416ad064caf0301d346fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94118
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
...as reported by e.g.
<https://ci.libreoffice.org/job/lo_tb_random_config_linux/2228/>
Change-Id: If6bc1105fd723f78dbcb36616371a823ee665611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94132
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
SkCanvas::draw() leads to deep copies of the source bitmap, moreover
RasterWindowContext_win allocates the pixels in a way that
SkSurface_Raster has to do a deep copy because of not owning
the pixels.
Change-Id: I22f6a2c0f96faf99f94140eff26ec0c22fae96d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93958
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
For pixel-wide lines it should not make a difference.
Change-Id: I28a9034eef9a81c6899c5fae679af5e413ee981c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93435
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
For backends that do the object-to-device coordinates transformation
directly, it's necessary to also convert the size of line width.
But simply multiplying it with the matrix can also rotate the line
width "vector", making it e.g. negative. So don't use just the X
coordinate, use vector length for the transformation, which is ok.
In fact it doesn't even make sense to treat width as a vector, because
a width simply is not a vector (and for this reason it's also not
actually used).
Change-Id: I1241c9cb29155df105170d568a879ebc32b11a5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93203
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
|
|
Change-Id: Ia08bc3824c9040e9601f4e4c3296e02b53ad5221
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93433
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
The cairo-based method on Unix and manual glyph handling way taken
from GL on Windows should be longer be needed, now that using Skia
itself for text rendering seems to work fine.
This reverts more or less reverts the following commits:
b1d3ef798a89d11b853c467fa9ce0fe6ed235735
5ac9a62f3a354db80837bdd1c95b763989b303bb
619959827003814053a5e9ec81acfd07b3aa270a
6f5c85daa0e5073d87d1d7699bfa59af159686ca
ad3580df085b3a3d66eb73cae997ea5ca178ccc1
f109a1ac6fdf0c878d53dfea6fceffd93248608f
59205c742c43b4c456b69c3fd94e7fa35ff3eec0
Change-Id: Ib28b2469c7d6471c227bb2aa08d5485bb24c2fe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93428
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I186622aec3e944b89536bdcd44ff0be6b1d9cd8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93213
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Icbf4c9e2a0fd37eaeb900e1074eabbe7949f3de9
|
|
Performing the delayed scaling for the bitmap data could keep
around cached mImage with a different size. Which theoretically could
be kept around and resized later, but the bitmap data scaling finishes
the delayed scaling by discarding all the data about it (scaling
quality), so the later resizing wouldn't know how.
Change-Id: I6a817d87becd44214f0f4db0755731b6e4ae1409
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92846
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I815fba5ae637a64fe381eb9e47632117bebfd81b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92790
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: Iba7219be1b0d95fdfdc708f31e2626b006a5e615
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92641
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
And use SkIRect rather than tools::Rectangle because the latter
messes up the size.
Change-Id: Iaba609635b63bd65092a9a66f2df5426e40e9d2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92794
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
No content yet, nothing to xor with.
Change-Id: I68b44d6051859a61d50c5fbf8e3c63e719a87ca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92753
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
This may become the actual fix or may be removed later depending
on the outcome of
https://groups.google.com/d/msgid/skia-discuss/202004151937.05051.l.lunak%40collabora.com .
Change-Id: I709f3e7bffbe86ddb2f6d75724bf30e4b0f0116e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92587
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
The code previously applied the xor operation after each drawing,
but the bugdoc draws a large number of polygons in xor mode,
so the xor drawing was done repeatedly. Do the xor drawing just
once when leaving the xor mode.
Change-Id: I6c8d1c2f01688dc957a0af75232ee9fb69fe5d1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92558
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I409509d434f5536c6f131c1330974d442e6eba57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92404
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I02c8cd7af2c35e8631932e3928d63c96dc0db255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92368
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|