summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2015-09-08tdf#94006 - re-factor to use rtl::Reference for OpenGLContexts.Michael Meeks
Don't use rtl::Reference for the global / list state, so the ref-count reflects the number of real users. Hold a reference during ~OpenGLContext. Change-Id: I4e57a7246159acd58ae7d5a0dfc8704b9795c894
2015-09-04vcl: replace boost::ptr_deque with std::deque<std::unique_ptr>Caolán McNamara
Change-Id: Id53ee54dda5454669affd5ca5324a2d7c5387063
2015-09-04convert Link<> to typedNoel Grandin
Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4 Reviewed-on: https://gerrit.libreoffice.org/18306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-02vcl: rename DESKTOP_KDE to DESKTOP_KDE3Michael Stahl
Change-Id: Ie9d4d339f0fe3248a7fd7f790adcb89e660d34ec
2015-09-01More useful param typeStephan Bergmann
...for arg that ultimately ends up as const GLVoid *pixels arg to glTexImage2D Change-Id: I69ba2f1dd397fa103f3f59638bec727add3caed7
2015-09-01Fixup CRC related unit tests for now.Michael Meeks
Change-Id: If15e30908103780d5d01191ee98f390dbebfc1d3
2015-09-01WaE: 'updateChecksum' overrides a member function but is not marked 'override'Tor Lillqvist
Change-Id: Ic2230e1d1f54e27d4189fc56b525a7e76ddab649
2015-09-01gl-checksum: added a minimum size check for using GL versionMarco Cecchetti
(nWidth * nHeight) < (1024*768) || nWidth < 128 || nHeight < 128 Change-Id: Iedda6a333958c76c19b837890eb3fa28e631bc90
2015-09-01CRC is an integer type -> mnChecksum.Michael Meeks
Change-Id: I9e4d36105a59c5f81677d8e062106dae6f709464
2015-09-01fix: buffer was released before getting checksum.Michael Meeks
g Conflicts: vcl/inc/salbmp.hxx Change-Id: I57d1e4b8e4909ce0b82c9e61ca271768cc73cd8b
2015-09-01vcl_get_checksum wraps the call to the real checksum functionMarco Cecchetti
Change-Id: I72916f18966756ecc99e77f1b164e99377eb456e
2015-09-01Switching to 64-bit checksum: substituted sal_uLong with BitmapChecksumMarco Cecchetti
A typedef sal_uLong BitmapChecksum; has been added to include/vcl/checksum.hxx Wherever needed sal_uLong and sal_Int32 has been substituted with BitmapChecksum. A BITMAP_CHECKSUM_BITS constant equal to the amount of bits used by the BitmapChecksum type has been defined and used in `GraphicID::GetIDString` (vstools/source/graphic/grfcache.cxx). Change-Id: I74bd285089e58a8b18c06233d75b87023c7bf31b
2015-09-01moved chechsum.hxx in include/vclMarco Cecchetti
Change-Id: I70f82f16d5907ce0bbe2d838c4acee226886aab2
2015-09-01Added support for computing 64-bit checksum of bitmap in OpenGLMarco Cecchetti
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896
2015-09-01tdf#93839 - Encourage vdevs to pick up new GL Contexts when they go invalid.Michael Meeks
Change-Id: I21726d0dd052fdc87e8dd36ff7122518325f6313
2015-08-31tdf#93772 - handle framebuffer unbinding on GL context switch.Michael Meeks
Also start gl tests in vcldemo: $ SAL_FORCEGL=1 vcldemo --gltests Change-Id: I8f0022770d57cd60c830659e3f7fcc0721320a10 Reviewed-on: https://gerrit.libreoffice.org/18132 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31tdf#93751 - ensure textures are unbound from framebuffers post destroy.Michael Meeks
Change-Id: I81aec0e6f8db57905826c54c3442528be6068700
2015-08-31vcl: Improve management of mnRef0Count.Jan Holesovsky
Follow-up to 34700400247e378e074ce4164ab2809edb092201; this fixes sw_ww8export unit test on Windows. Change-Id: Ic0c3228efb59a182e1562b73117418cd8b5e6017
2015-08-29sal_uLong to sal_uInt32 for CRC32Matteo Casalin
Change-Id: Id13e07f479615b8eb39d05e6534f514277cc3d03
2015-08-28vcl: fix resource management issue in WinSalLayoutMichael Stahl
Since commit 65a66d41fd0e13d0aad9df935091b731b4af650a the sd_exports_test crashes on Windows in UniscribeLayout because it uses a ImplFontEntry that has been removed from the font cache. Tweak the refcount in WinLayout so it will be valid. Change-Id: Ic4bf984ea9fd70de9fa95ca964ae12d95d47d5bf
2015-08-28make PostUserEvent Link<> typedNoel Grandin
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-26Convert vcl Button Link<> click handler to typed Link<Button*,void>Noel Grandin
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-26Bin the fairly useless DbgDialog stuff and handle falloutTor Lillqvist
See (short) discussion on the mailing list, "How was it again, is the DbgDialog useful?". Change-Id: Ibde1eb13f16edf94f1f7aebd0befd1b0b171d5c4
2015-08-26vcl OpenGL program: Cache mvp matrix to reduce ~200 api calls per frame.Lubosz Sarnecki
(cherry picked from commit e3cd97ce0b2e153b8b6812cc66f2e7d33504a7da) Conflicts: vcl/opengl/program.cxx Change-Id: I86ae50bd8d2148e86a6c8fc0821d3e2bc29a0cd4
2015-08-25tdf#93614 - detect hanging OpenGL drivers with a watchdog.Michael Meeks
If an OpenGL zone takes >2s to make progress, disable OpenGL. If an OpenGL zone takes >5s to make progress, abort the app. Change-Id: I776c06a3f8ba460ff9842a9130c21f9ee2147eee Reviewed-on: https://gerrit.libreoffice.org/17986 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-25Nitpick: Follow our header guard naming conventionTor Lillqvist
Change-Id: I939d36dbb0a298f8181367f74001115ef89d5bc2
2015-08-24include vectorCaolán McNamara
Change-Id: I84f571c0564b33a5b647a270c567959b415b3747
2015-08-24opengl: push mask coords to the shaders along the image coordsTomaž Vajngerl
If using the same texture to store the image and mask data (for example when using texture atlas) the mask and image (RGB) coords aren't the same anymore. With this commit we always define the mask coords separately. Change-Id: Ie33f87a6e9ab398972c6a3d5938e5f1364c82d36
2015-08-24Fixed (fixed size) texture atlas for "caching" OpenGL texuresTomaž Vajngerl
Change-Id: I7fe90c0a0033b4d9a341a4f0b8356d7f7133e93e
2015-08-24save texture to file as a PNG imageTomaž Vajngerl
Change-Id: I5605b80f95d89599efe58cf65e1ce3f3581d401f
2015-08-21ColorMask: sal_uLong to better types, minor code reworkMatteo Casalin
Change-Id: I426fa847038e7a6f788761242cb43e38cb355a36
2015-08-21No NO_MAPPERS, NO_TYPE3, NO_TYPE42 or NO_TTCR anywhereTor Lillqvist
Change-Id: Icab5608900108c89e649e78a2e35d02e941d0ac0
2015-08-21tdf#93547 - Disable OpenGL if we have a SEGV on windows in that code.Michael Meeks
Annotate when we are in an OpenGL rendering zone. Check for this in the VCL signal handler, and force OpenGL off here if exception occurred inside an OpenGL code-path. Change-Id: I85a4b3d4a374593dc55d01a39ec4c7c3c262c332 Reviewed-on: https://gerrit.libreoffice.org/17881 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-20Drop code that is dead after 4667db065d34193d99bce82f7e8f3b20a03ecadeTor Lillqvist
Change-Id: Id023b43e901b0e41ebf3b208c6e80fd023bf7f9a
2015-08-19Initial hack for OpenGL glyph caching on WindowsTor Lillqvist
Shows text roughly correctly, but many problems. Conditional at run-time on the SAL_ENABLE_GLYPH_CACHING environment variable in addition to SAL_FORCEGL. One obvious thing that needs fixing is making sure that the glyphs are rendered into the texture without overlap. Compensating negative values in the ABC::abcA and ABC::abdC width is not enough. Also, the cache should be changed to actually have "cache" functionality, i.e. entries should expire based on some criterion. Change-Id: I66a37d3354a09011a654f15a7d2bd8efaa14ad1e
2015-08-17tdf#93482 vcl rendercontext: introduce WindowImpl::mbDoubleBufferingRequestedMiklos Vajna
The intention is that currently double-buffering is either enabled globally or not. Double-buffering is known to be working in Writer, but not in other applications, so it would be nice if double-buffering could be also half-enabled: only in the applications where it's known to work. For that, we need to differentiate between "we have a buffer" (supports double buffering) and "we want to have a buffer if possible" (double buffering requested). Change-Id: If48d6dc0ddf5841497e78b856d803cc8abf23ac9
2015-08-17Put Polygon from tools under tools:: namespaceNorbert Thiebaud
Polygon is one of these names that Clash with some system objects A similar work has been done earlier with PolyPolygon. Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5 Reviewed-on: https://gerrit.libreoffice.org/17789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-16Fix tdf#40091 and tdf#40335 text layout issues.Mark Hung
tdf#40091 Vertical writing inferior to MS Word tdf#40335 Using Right-to-left (vertical) for text, the characters overlap each other. Cursor is placed at the half of the character. It seems that current implementation use HarfBuzz OpenType layout API hb_buffer_get_glyph_positions() to layout the text, however instead of setting text direction to HB_DIRECTION_TTB, it uses HB_DIRECTION_LTR as its direction and rotates each CJK glyph to simulate the HB_DIRECTION_TTB. However the API use font width to position each glyph no matter whether the glyph will be rotated or not. Change-Id: Ie35238dd92218f8c4463c0ae1d356ad8609c5f48 Reviewed-on: https://gerrit.libreoffice.org/17774 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-13kill YIELD_GUARD macroNorbert Thiebaud
Change-Id: I81990df584255f4a286cd078bcf15917c00ad504 Reviewed-on: https://gerrit.libreoffice.org/17687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-12cosmetic: clean-up vcl/quartzNorbert Thiebaud
Change-Id: I6f15e7ce90598eb4f8e7bb59c7c65d1aa333b972 Reviewed-on: https://gerrit.libreoffice.org/17661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-11tdf#93364 vcl rendercontext: fix area that is painted in PaintBuffer()Miklos Vajna
Usually the topmost window of a paint hierarchy has a paint rectangle that covers the paint rectangle of all its children, but this is not necessarly true in every case. One example is the cursor travelling described in the bug report, where the topmost DockingAreaWindow only paints a few buttons on the toolbar, and then even if children are painted correctly to the frame-level persistent buffer, only the DockingAreaWindow part of the buffer is copied to the screen. Fix this by building an union rectangle that covers all areas in a buffered paint run, and then paint that rectangle from the buffer, not just the paint rectangle of the topmost parent. Change-Id: Ib0b30413d83c4b3fdec27fa7ddad16c21fd094b6
2015-08-11vcl: add SalFrame / SalVirtualDevice doxygen commentsMiklos Vajna
Change-Id: I0c2a9a5b4266ee0f0d15b7cbfa49f898930d002a
2015-08-10SimpleWinLayout::mbDisableGlyphs was always trueTor Lillqvist
Remove dead code. Should have no effect on behaviour. Possibly originally the intent was that mbDisableGlyphs would have been false in most cases on NT-based Windows (all versions that we support now). However, since dadfc60873d4dce4e0c46e1d3405f8d45535cdcf, in 2005, mbDisableGlyphs was set to always true in the SimpleWinLayout ctor. Change-Id: Id929224d5656706762c2f44ee26c76f8b20ee8b8
2015-08-07Resolves: tdf#92982 vcl rendercontext: handle buffered paint of vcl::CursorMiklos Vajna
Instead of painting on the vcl::Window directly, take a PaintBufferGuard, and use the vcl::RenderContext of it, that may be either the vcl::Window or the toplevel frame's buffer. Trigger the paint of the buffer by informing the guard what area was painted. In case of direct painting, both the ctor and the dtor of the guard is a NOP. This means that finally we can also assert Invert() calls on the output device, so that direct paint can't happen when double-buffering. Change-Id: I0322563369dc63b3c49061cbe7c4a911cb13a2e2
2015-08-07tdf#92982 vcl rendercontext: move buffer paint logic to PaintBufferGuardMiklos Vajna
The motivation is that this way vcl::Cursor will be able to reuse it. Change-Id: I7e89d5acb5d63d3297d7c3c8050ccd2172c8608d
2015-08-07tdf#92982 vcl rendercontext: make PaintBufferGuard visible outside paint.cxxMiklos Vajna
Change-Id: I4bafba3d99fc45d6d5fa875a91d498518d3a0c29
2015-08-07opengl: cache native widget textures also for WindowsTomaž Vajngerl
Change-Id: I476f0ffaef383f3227c0c12b50fcdebf393190f6 Reviewed-on: https://gerrit.libreoffice.org/17487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2015-08-05loplugin:unusedmethodsNoel Grandin
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03remove some unused typedefsNoel Grandin
Change-Id: I98c1e7eaa66b7afb05255a017a3de54714637501 Reviewed-on: https://gerrit.libreoffice.org/17491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03opengl: when scaling, create a new texture with equal settingsTomaž Vajngerl
Change-Id: Id0258fe0db89aa06b91233ae2052f018d606cc74