[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 0 commits -

2018-10-17 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 3 commits - include/sfx2 sfx2/source

2016-05-24 Thread László Németh
 include/sfx2/bindings.hxx|7 +--
 sfx2/source/control/bindings.cxx |   75 ++-
 2 files changed, 47 insertions(+), 35 deletions(-)

New commits:
commit f0bea419a5148aeade87046769f4355e333bfefd
Author: László Németh 
Date:   Wed May 25 02:01:45 2016 +0200

empty commit (repeat)

Change-Id: I5ad3ae29ddd83760569ca7f02804e1e20e25f789
commit dcac2912b6653bd04214347344b8ee1a2041190b
Author: László Németh 
Date:   Wed May 25 02:01:34 2016 +0200

Revert "tdf#94236: Change Timer in SfxRequest to an Idle to improve 
feedback."

This reverts commit 702718d3b49780c165afe59d2a7de950209dcaa8.

diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 1daec4e..bbe5cc4 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -35,7 +35,6 @@
 
 //  forwards, typedefs, declarations
 
-class Idle;
 class SystemWindow;
 class SfxSlot;
 class SfxSlotServer;
@@ -45,6 +44,7 @@ class SfxItemSet;
 class SfxDispatcher;
 class SfxBindings;
 class SfxBindings_Impl;
+class Timer;
 class SfxWorkWindow;
 class SfxUnoControllerItem;
 struct SfxFoundCache_Impl;
@@ -131,9 +131,8 @@ private:
 const SfxPoolItem *pItem,
 SfxItemState eItemState );
 SAL_DLLPRIVATE SfxStateCache* GetStateCache( sal_uInt16 nId, sal_uInt16 
*pPos);
-
-DECL_DLLPRIVATE_LINK_TYPED(NextJob, Idle *, void);
-SAL_DLLPRIVATE bool NextJob_Impl(Idle * pIdle);
+DECL_DLLPRIVATE_LINK_TYPED( NextJob, Timer *, void );
+SAL_DLLPRIVATE bool NextJob_Impl(Timer * pTimer);
 
 public:
  SfxBindings();
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 49f4b17..98388a8 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -71,8 +71,15 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 
+static sal_uInt16 nTimeOut = 300;
+
+#define TIMEOUT_FIRST   nTimeOut
+#define TIMEOUT_UPDATING 20
+
 typedef std::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
 
+
+
 typedef std::vector SfxStateCacheArr_Impl;
 
 struct SfxFoundCache_Impl
@@ -210,7 +217,7 @@ public:
 boolbAllMsgDirty;   //  Has a MessageServer been 
invalidated?
 boolbAllDirty;  // After InvalidateAll
 boolbCtrlReleased;  // while EnterRegistrations
-IdlemaIdle; // for volatile Slots
+AutoTimer   aTimer; // for volatile Slots
 boolbInUpdate;  // for Assertions
 boolbInNextJob; // for Assertions
 boolbFirstRound;// First round in Update
@@ -245,12 +252,11 @@ SfxBindings::SfxBindings()
 // all caches are valid (no pending invalidate-job)
 // create the list of caches
 pImp->pCaches = new SfxStateCacheArr_Impl;
-
-pImp->maIdle.SetPriority(SchedulerPriority::MEDIUM);
-pImp->maIdle.SetIdleHdl(LINK(this, SfxBindings, NextJob));
+pImp->aTimer.SetTimeoutHdl( LINK(this, SfxBindings, NextJob) );
 }
 
 
+
 SfxBindings::~SfxBindings()
 
 /*  [Description]
@@ -271,9 +277,7 @@ SfxBindings::~SfxBindings()
 
 ENTERREGISTRATIONS();
 
-pImp->maIdle.SetIdleHdl(Link());
-pImp->maIdle.Stop();
-
+pImp->aTimer.Stop();
 DeleteControllers_Impl();
 
 // Delete Caches
@@ -698,11 +702,11 @@ void SfxBindings::InvalidateAll
 (*pImp->pCaches)[n]->Invalidate(bWithMsg);
 
 pImp->nMsgPos = 0;
-
 if ( !nRegLevel )
 {
-pImp->maIdle.Stop();
-pImp->maIdle.Start();
+pImp->aTimer.Stop();
+pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+pImp->aTimer.Start();
 }
 }
 
@@ -750,11 +754,11 @@ void SfxBindings::Invalidate
 
 // if not enticed to start update timer
 pImp->nMsgPos = 0;
-
 if ( !nRegLevel )
 {
-pImp->maIdle.Stop();
-pImp->maIdle.Start();
+pImp->aTimer.Stop();
+pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+pImp->aTimer.Start();
 }
 }
 
@@ -804,11 +808,11 @@ void SfxBindings::InvalidateShell
 pCache->Invalidate(false);
 }
 pImp->nMsgPos = 0;
-
 if ( !nRegLevel )
 {
-pImp->maIdle.Stop();
-pImp->maIdle.Start();
+pImp->aTimer.Stop();
+pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+pImp->aTimer.Start();
 pImp->bFirstRound = true;
 pImp->nFirstShell = nLevel;
 }
@@ -841,11 +845,11 @@ void SfxBindings::Invalidate
 {
 pCache->Invalidate(false);
 pImp->nMsgPos = std::min(GetSlotPos(nId), pImp->nMsgPos);
-
 if ( !nRegLevel )
 {
-pImp->maIdle.Stop();
-pImp->maIdle.Start();
+

[Libreoffice-commits] core.git: Branch 'feature/fixes21' - sw/source

2016-05-24 Thread Miklos Vajna
 sw/source/uibase/uno/unotxvw.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit b8967027a4d9adb970f788e00ae7afa98eb0c19b
Author: Miklos Vajna 
Date:   Tue May 24 17:30:55 2016 +0200

Partially revert "loplugin:constantparam in sw"

This partially reverts commit 9585c8b8c8d8724cc1bad4a2060c828c15599929. 
Instead
of removing the nCount parameters, make use of them in
SwXTextViewCursor::go{Left,Right,Down,Up}.

For the following testcase: a document with 1000 lines, and calling
goDown(1000, true) the spent time goes from 4 secs to 1.8 secs with this for
me.

Change-Id: I18b83a150e3cc17a08a634b0c60776ee93cc31f0

diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 1c61342..c83fd07 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -1006,8 +1006,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, 
sal_Bool bExpand)
 if (!IsTextSelection())
 throw  uno::RuntimeException("no text selection", static_cast < 
cppu::OWeakObject * > ( this ) );
 
-for( sal_uInt16 i = 0; i < nCount; i++ )
-bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, 
true );
+bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, nCount, 
true );
 }
 else
 throw uno::RuntimeException();
@@ -1024,8 +1023,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, 
sal_Bool bExpand)
 if (!IsTextSelection())
 throw  uno::RuntimeException("no text selection", static_cast < 
cppu::OWeakObject * > ( this ) );
 
-for( sal_uInt16 i = 0; i < nCount; i++ )
-bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, 
true );
+bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, nCount, 
true );
 }
 else
 throw uno::RuntimeException();
@@ -1620,8 +1618,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, 
sal_Bool bExpand)
 if (!IsTextSelection())
 throw  uno::RuntimeException("no text selection", static_cast < 
cppu::OWeakObject * > ( this ) );
 
-for( sal_uInt16 i = 0; i < nCount; i++ )
-bRet = m_pView->GetWrtShell().Down( bExpand, 1, true );
+bRet = m_pView->GetWrtShell().Down( bExpand, nCount, true );
 }
 else
 throw uno::RuntimeException();
@@ -1638,8 +1635,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, 
sal_Bool bExpand)
 if (!IsTextSelection())
 throw  uno::RuntimeException("no text selection", static_cast < 
cppu::OWeakObject * > ( this ) );
 
-for( sal_uInt16 i = 0; i < nCount; i++ )
-bRet = m_pView->GetWrtShell().Up( bExpand, 1, true );
+bRet = m_pView->GetWrtShell().Up( bExpand, nCount, true );
 }
 else
 throw uno::RuntimeException();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits -

2016-05-23 Thread László Németh
 0 files changed

New commits:
commit c6646645d4f43609bb280d387121b0b0f23bf1f5
Author: László Németh 
Date:   Mon May 23 23:33:32 2016 +0200

empty commit (repeat)

Change-Id: Id07b661fd99309d65b0787acf1e3c55cab4708c7
commit 31975055f96b6cf9e527fcd39bb216c44017d674
Author: László Németh 
Date:   Mon May 23 23:33:14 2016 +0200

empty commit (repeat)

Change-Id: I3814dc0bde2b28c89b2239f6822fb1b80fc18247
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-23 Thread László Németh
 0 files changed

New commits:
commit 7e9ad88c28662b7d4c31e97c8f67049bc59e61a4
Author: László Németh 
Date:   Mon May 23 20:48:43 2016 +0200

empty commit (new odt)

Change-Id: I0c227d6af64818614e2fd7f03d6ee0fd10d8021d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-23 Thread László Németh
 0 files changed

New commits:
commit 190ec0928c8d6b96b6b0018fcf207b7cb6a5af11
Author: László Németh 
Date:   Mon May 23 16:41:14 2016 +0200

empty commit (orig)

Change-Id: Iee579465dadeb062d1340facc4368ac2feced216
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-23 Thread László Németh
 0 files changed

New commits:
commit 20f32a99128dd696020318924f64b13b6ca696bc
Author: László Németh 
Date:   Mon May 23 10:21:21 2016 +0200

empty commit (small)

Change-Id: I138b6b23af6d8887c6498b5f6c053e60a503d3a3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-20 Thread László Németh
 0 files changed

New commits:
commit 180c762e214eea5f24efbc58d0b9d8d1fb6ba851
Author: László Németh 
Date:   Fri May 20 18:55:34 2016 +0200

empty commit (calc proc. idle, format change)

Change-Id: I75d48a75d4de54a7086bbc7fdb8afc1660e179e3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/inc vcl/opengl vcl/Package_opengl.mk

2016-05-20 Thread Tomaž Vajngerl
 vcl/Package_opengl.mk |4 +
 vcl/inc/opengl/program.hxx|   19 +++
 vcl/opengl/combinedFragmentShader.glsl|   45 
 vcl/opengl/combinedTextureFragmentShader.glsl |   64 
 vcl/opengl/combinedTextureVertexShader.glsl   |   32 
 vcl/opengl/combinedVertexShader.glsl  |   47 +
 vcl/opengl/gdiimpl.cxx|   69 --
 vcl/opengl/program.cxx|   18 ++
 8 files changed, 273 insertions(+), 25 deletions(-)

New commits:
commit df30dea13bd87ff94a1894805f43b5e03c61dc29
Author: Tomaž Vajngerl 
Date:   Fri May 20 14:59:24 2016 +0900

opengl: combined shaders to reduce shader switching

Change-Id: I6701b93faa9b0f55dd0af6d983ce4c2de4539c70

diff --git a/vcl/Package_opengl.mk b/vcl/Package_opengl.mk
index a0f6e9a..2fa917e 100644
--- a/vcl/Package_opengl.mk
+++ b/vcl/Package_opengl.mk
@@ -21,6 +21,10 @@ $(eval $(call 
gb_Package_add_files,vcl_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
 invert50FragmentShader.glsl \
convolutionFragmentShader.glsl \
linearGradientFragmentShader.glsl \
+   combinedTextureFragmentShader.glsl \
+   combinedTextureVertexShader.glsl \
+   combinedFragmentShader.glsl \
+   combinedVertexShader.glsl \
lineFragmentShader.glsl \
lineVertexShader.glsl \
maskFragmentShader.glsl \
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 5944c72..2fab98c 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -27,6 +27,21 @@
 typedef std::unordered_map< OString, GLuint, OStringHash > UniformCache;
 typedef std::list< OpenGLTexture > TextureList;
 
+enum class TextureShaderType
+{
+Normal = 0,
+Blend,
+Masked,
+Diff,
+MaskedColor
+};
+
+enum class DrawShaderType
+{
+Normal = 0,
+Line
+};
+
 class VCL_PLUGIN_PUBLIC OpenGLProgram
 {
 private:
@@ -78,6 +93,10 @@ public:
 void SetTransform( const OString& rName, const OpenGLTexture& rTexture,
const basegfx::B2DPoint& rNull, const 
basegfx::B2DPoint& rX,
const basegfx::B2DPoint& rY );
+void SetIdentityTransform(const OString& rName);
+void SetShaderType(TextureShaderType eTextureShaderType);
+void SetShaderType(DrawShaderType eDrawShaderType);
+
 void SetBlendMode( GLenum nSFactor, GLenum nDFactor );
 
 void ApplyMatrix(float fWidth, float fHeight, float fPixelOffset = 0.0f);
diff --git a/vcl/opengl/combinedFragmentShader.glsl 
b/vcl/opengl/combinedFragmentShader.glsl
new file mode 100644
index 000..c44e75c
--- /dev/null
+++ b/vcl/opengl/combinedFragmentShader.glsl
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+varying float fade_factor; // 0->1 fade factor used for AA
+uniform vec4 color;
+
+uniform float line_width;
+uniform float feather;
+
+#define TYPE_NORMAL 0
+#define TYPE_LINE   1
+
+uniform int type;
+
+void main()
+{
+float alpha = 1.0;
+
+if (type == TYPE_LINE)
+{
+float start = (line_width / 2.0) - feather; // where we start to apply 
alpha
+float end = (line_width / 2.0) + feather; // where we end to apply 
alpha
+
+// Calculate the multiplier so we can transform the 0->1 fade factor
+// to take feather and line width into account.
+float multiplied = 1.0 / (1.0 - (start / end));
+
+float dist = (1.0 - abs(fade_factor)) * multiplied;
+
+alpha = clamp(dist, 0.0, 1.0);
+}
+
+vec4 result_color = color;
+result_color.a = result_color.a * alpha;
+
+gl_FragColor = result_color;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/opengl/combinedTextureFragmentShader.glsl 
b/vcl/opengl/combinedTextureFragmentShader.glsl
new file mode 100644
index 000..d8864cf
--- /dev/null
+++ b/vcl/opengl/combinedTextureFragmentShader.glsl
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+varying vec2 tex_coord;
+varying vec2 alpha_coord;
+varying vec2 mask_coord;
+
+uniform sampler2D texture;
+uniform sampler2D mask;
+uniform sampler2D alpha;
+
+uniform vec4 color;
+
+uniform int type;
+
+#define TYPE_NORMAL   0
+#define TYPE_BLEND1
+#define TYPE_MASKED   2
+#define TYPE_DIFF   

[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-20 Thread László Németh
 0 files changed

New commits:
commit c8248923e2b9d8625621bcde70715ff7e4f5e8fe
Author: László Németh 
Date:   Fri May 20 13:07:53 2016 +0200

empty commit (medium, jpg)

Change-Id: I42e2161ae4fac77548aa9c50e45d993f9a768d11
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits - vcl/inc vcl/opengl

2016-05-19 Thread Tomaž Vajngerl
 vcl/inc/openglgdiimpl.hxx |5 
 vcl/opengl/gdiimpl.cxx|  303 +-
 2 files changed, 36 insertions(+), 272 deletions(-)

New commits:
commit 04c6d41f0f20b23a368f5cc79385a3f8ce8b3627
Author: Tomaž Vajngerl 
Date:   Thu May 19 21:35:28 2016 +0900

opengl: use line shader for all line drawing not just polylines

Change-Id: I9c2d5c5ca4761867a0a38cb3bc3c4973454ee992

diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 284a233..da0fe69 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -114,16 +114,12 @@ public:
 bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );
 bool UseSolid( SalColor nColor, double fTransparency );
 bool UseSolid( SalColor nColor );
-bool UseSolidAA( SalColor nColor, double fTransparency );
-bool UseSolidAA( SalColor nColor );
 bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, 
bool bUseAA);
 bool UseInvert50();
 bool UseInvert(SalInvert nFlags);
 
 void DrawPoint( long nX, long nY );
 void DrawLine( double nX1, double nY1, double nX2, double nY2 );
-void DrawLineAA( double nX1, double nY1, double nX2, double nY2 );
-void DrawEdgeAA( double nX1, double nY1, double nX2, double nY2 );
 void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool 
blockAA = false );
 void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = 
false );
 void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = 
false );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index d5e6b71..48871d5 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -581,25 +581,6 @@ bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor )
 return UseSolid( nColor, 0.0f );
 }
 
-// Like UseSolid(), but sets up for AA drawing, which uses gradients to create 
the AA.
-bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor, double fTransparency )
-{
-if( nColor == SALCOLOR_NONE )
-return false;
-if( !mrParent.getAntiAliasB2DDraw())
-return UseSolid( nColor );
-if( !UseProgram( "textureVertexShader", "linearGradientFragmentShader" ) )
-return false;
-mpProgram->SetColorf( "start_color", nColor, fTransparency );
-mpProgram->SetColorf( "end_color", nColor, 1.0f );
-return true;
-}
-
-bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor )
-{
-return UseSolidAA( nColor, 0.0 );
-}
-
 bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags )
 {
 OpenGLZone aZone;
@@ -715,7 +696,7 @@ void OpenGLSalGraphicsImpl::DrawLineCap(float x1, float y1, 
float x2, float y2,
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -727,9 +708,6 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 glm::vec2 p1(x1, y1);
 glm::vec2 p2(x2, y2);
 
-if (p1.x == p2.x && p1.y == p2.y)
-return;
-
 std::vector aPoints;
 std::vector aExtrusionVectors;
 
@@ -741,7 +719,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 addVertexPair(aPoints, aExtrusionVectors, p1, normal, 1.0f);
 addVertexPair(aPoints, aExtrusionVectors, p2, normal, 1.0f);
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aPoints);
 
@@ -935,7 +913,7 @@ void OpenGLSalGraphicsImpl::DrawPolyLine(const 
basegfx::B2DPolygon& rPolygon, fl
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -964,170 +942,6 @@ bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, 
double fTransparency, GLflo
 return true;
 }
 
-void OpenGLSalGraphicsImpl::DrawLineAA( double nX1, double nY1, double nX2, 
double nY2 )
-{
-OpenGLZone aZone;
-
-if( !mrParent.getAntiAliasB2DDraw())
-return DrawLine( nX1, nY1, nX2, nY2 );
-
-if( nX1 == nX2 || nY1 == nY2 )
-{   // Horizontal/vertical, no need for AA, both points have normal color.
-
-// Still set up for the trivial "gradients", because presumably 
UseSolidAA() has been called.
-GLfloat aTexCoord[4] = { 0, 1, 1, 1 };
-mpProgram->SetTextureCoord( aTexCoord );
-DrawLine(nX1, nY1, nX2, nY2);
-
-return;
-}
-ImplDrawLineAA( nX1, nY1, nX2, nY2 );
-}
-
-void OpenGLSalGraphicsImpl::ImplDrawLineAA( double nX1, double nY1, double 
nX2, double nY2, bool edge )
-{
-// Draw the line 

[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-19 Thread László Németh
 0 files changed

New commits:
commit f8b13f140ee85ccac087fda6c1f09992e4b7c67c
Author: László Németh 
Date:   Fri May 20 03:28:16 2016 +0200

empty commit (determ. sched.)

Change-Id: I828b98d748da616d137ff85a9a56d567a2f8e37a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/inc vcl/opengl

2016-05-19 Thread László Németh
 vcl/inc/openglgdiimpl.hxx |5 
 vcl/opengl/gdiimpl.cxx|  304 --
 2 files changed, 272 insertions(+), 37 deletions(-)

New commits:
commit 05ac44e7e6c16bfb093c19630da67ac42ae913bf
Author: László Németh 
Date:   Thu May 19 20:12:41 2016 +0200

default subset, calculate all, format change

Also revert "opengl: use line shader for all line drawing not just 
polylines"

This reverts commit 860f19365264aaf192dd6e2464efa02123a2cd91.
and 808a4cdc7e19823b15123f8037173a7dd43e5727

Change-Id: Ifed8f1a4f5b4880a5fb24e2db8708f7d14b0b869

diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index da0fe69..6dfa73c 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -114,12 +114,17 @@ public:
 bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );
 bool UseSolid( SalColor nColor, double fTransparency );
 bool UseSolid( SalColor nColor );
+bool UseSolidAA( SalColor nColor, double fTransparency );
+bool UseSolidAA( SalColor nColor );
 bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, 
bool bUseAA);
 bool UseInvert50();
 bool UseInvert(SalInvert nFlags);
 
 void DrawPoint( long nX, long nY );
 void DrawLine( double nX1, double nY1, double nX2, double nY2 );
+void DrawLineAA( double nX1, double nY1, double nX2, double nY2 );
+void DrawLinesAA( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose 
);
+void DrawEdgeAA( double nX1, double nY1, double nX2, double nY2 );
 void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool 
blockAA = false );
 void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = 
false );
 void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = 
false );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 42a62fc..2beb5fe 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -581,6 +581,25 @@ bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor )
 return UseSolid( nColor, 0.0f );
 }
 
+// Like UseSolid(), but sets up for AA drawing, which uses gradients to create 
the AA.
+bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor, double fTransparency )
+{
+if( nColor == SALCOLOR_NONE )
+return false;
+if( !mrParent.getAntiAliasB2DDraw())
+return UseSolid( nColor );
+if( !UseProgram( "textureVertexShader", "linearGradientFragmentShader" ) )
+return false;
+mpProgram->SetColorf( "start_color", nColor, fTransparency );
+mpProgram->SetColorf( "end_color", nColor, 1.0f );
+return true;
+}
+
+bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor )
+{
+return UseSolidAA( nColor, 0.0 );
+}
+
 bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags )
 {
 OpenGLZone aZone;
@@ -696,7 +715,7 @@ void OpenGLSalGraphicsImpl::DrawLineCap(float x1, float y1, 
float x2, float y2,
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.5f);
+ApplyProgramMatrices(0.0f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -708,6 +727,9 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 glm::vec2 p1(x1, y1);
 glm::vec2 p2(x2, y2);
 
+if (p1.x == p2.x && p1.y == p2.y)
+return;
+
 std::vector aPoints;
 std::vector aExtrusionVectors;
 
@@ -719,7 +741,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 addVertexPair(aPoints, aExtrusionVectors, p1, normal, 1.0f);
 addVertexPair(aPoints, aExtrusionVectors, p2, normal, 1.0f);
 
-ApplyProgramMatrices(0.5f);
+ApplyProgramMatrices(0.0f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aPoints);
 
@@ -913,7 +935,7 @@ void OpenGLSalGraphicsImpl::DrawPolyLine(const 
basegfx::B2DPolygon& rPolygon, fl
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.5f);
+ApplyProgramMatrices(0.0f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -942,6 +964,179 @@ bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, 
double fTransparency, GLflo
 return true;
 }
 
+void OpenGLSalGraphicsImpl::DrawLineAA( double nX1, double nY1, double nX2, 
double nY2 )
+{
+OpenGLZone aZone;
+
+if( !mrParent.getAntiAliasB2DDraw())
+return DrawLine( nX1, nY1, nX2, nY2 );
+
+if( nX1 == nX2 || nY1 == nY2 )
+{   // Horizontal/vertical, no need for AA, both points have normal color.
+
+// Still set up for the trivial "gradients", because presumably 
UseSolidAA() has been called.
+GLfloat aTexCoord[4] = { 0, 1, 1, 1 };
+

[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits - vcl/inc vcl/opengl

2016-05-19 Thread Tomaž Vajngerl
 vcl/inc/openglgdiimpl.hxx |5 
 vcl/opengl/gdiimpl.cxx|  304 +-
 2 files changed, 37 insertions(+), 272 deletions(-)

New commits:
commit 860f19365264aaf192dd6e2464efa02123a2cd91
Author: Tomaž Vajngerl 
Date:   Thu May 19 21:35:28 2016 +0900

opengl: use line shader for all line drawing not just polylines

Change-Id: I9c2d5c5ca4761867a0a38cb3bc3c4973454ee992

diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 284a233..da0fe69 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -114,16 +114,12 @@ public:
 bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );
 bool UseSolid( SalColor nColor, double fTransparency );
 bool UseSolid( SalColor nColor );
-bool UseSolidAA( SalColor nColor, double fTransparency );
-bool UseSolidAA( SalColor nColor );
 bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, 
bool bUseAA);
 bool UseInvert50();
 bool UseInvert(SalInvert nFlags);
 
 void DrawPoint( long nX, long nY );
 void DrawLine( double nX1, double nY1, double nX2, double nY2 );
-void DrawLineAA( double nX1, double nY1, double nX2, double nY2 );
-void DrawEdgeAA( double nX1, double nY1, double nX2, double nY2 );
 void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool 
blockAA = false );
 void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = 
false );
 void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = 
false );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 593f42b..42a62fc 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -581,25 +581,6 @@ bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor )
 return UseSolid( nColor, 0.0f );
 }
 
-// Like UseSolid(), but sets up for AA drawing, which uses gradients to create 
the AA.
-bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor, double fTransparency )
-{
-if( nColor == SALCOLOR_NONE )
-return false;
-if( !mrParent.getAntiAliasB2DDraw())
-return UseSolid( nColor );
-if( !UseProgram( "textureVertexShader", "linearGradientFragmentShader" ) )
-return false;
-mpProgram->SetColorf( "start_color", nColor, fTransparency );
-mpProgram->SetColorf( "end_color", nColor, 1.0f );
-return true;
-}
-
-bool OpenGLSalGraphicsImpl::UseSolidAA( SalColor nColor )
-{
-return UseSolidAA( nColor, 0.0 );
-}
-
 bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags )
 {
 OpenGLZone aZone;
@@ -715,7 +696,7 @@ void OpenGLSalGraphicsImpl::DrawLineCap(float x1, float y1, 
float x2, float y2,
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -727,9 +708,6 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 glm::vec2 p1(x1, y1);
 glm::vec2 p2(x2, y2);
 
-if (p1.x == p2.x && p1.y == p2.y)
-return;
-
 std::vector aPoints;
 std::vector aExtrusionVectors;
 
@@ -741,7 +719,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float 
y1, float x2, float
 addVertexPair(aPoints, aExtrusionVectors, p1, normal, 1.0f);
 addVertexPair(aPoints, aExtrusionVectors, p2, normal, 1.0f);
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aPoints);
 
@@ -935,7 +913,7 @@ void OpenGLSalGraphicsImpl::DrawPolyLine(const 
basegfx::B2DPolygon& rPolygon, fl
 addVertexPair(aVertices, aExtrusionVectors, p1, normal, 1.0f);
 }
 
-ApplyProgramMatrices(0.0f);
+ApplyProgramMatrices(0.5f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
 mpProgram->DrawArrays(GL_TRIANGLE_STRIP, aVertices);
 
@@ -964,170 +942,6 @@ bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, 
double fTransparency, GLflo
 return true;
 }
 
-void OpenGLSalGraphicsImpl::DrawLineAA( double nX1, double nY1, double nX2, 
double nY2 )
-{
-OpenGLZone aZone;
-
-if( !mrParent.getAntiAliasB2DDraw())
-return DrawLine( nX1, nY1, nX2, nY2 );
-
-if( nX1 == nX2 || nY1 == nY2 )
-{   // Horizontal/vertical, no need for AA, both points have normal color.
-
-// Still set up for the trivial "gradients", because presumably 
UseSolidAA() has been called.
-GLfloat aTexCoord[4] = { 0, 1, 1, 1 };
-mpProgram->SetTextureCoord( aTexCoord );
-DrawLine(nX1, nY1, nX2, nY2);
-
-return;
-}
-ImplDrawLineAA( nX1, nY1, nX2, nY2 );
-}
-
-void OpenGLSalGraphicsImpl::ImplDrawLineAA( double nX1, double nY1, double 
nX2, double nY2, bool edge )
-{
-// Draw the line 

[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-19 Thread László Németh
 0 files changed

New commits:
commit c9662d4be99adae231cd4826dd310d4849787193
Author: László Németh 
Date:   Thu May 19 13:52:31 2016 +0200

empty commit (remove selection, process idle before)

Change-Id: I83a51f13ac47de3ee3a45a5d471d2db463a743d3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-18 Thread László Németh
 0 files changed

New commits:
commit 54a9da90c313aade38cfd345915019c408ece482
Author: László Németh 
Date:   Wed May 18 13:00:53 2016 +0200

empty commit (enable all formulae)

Change-Id: I588ff3d678dda066394d98b370da3ac0d9a78c77
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-17 Thread László Németh
 0 files changed

New commits:
commit f4bc2b71002a1cd5c2c3af5dcf398bdf3bf2c119
Author: László Németh 
Date:   Wed May 18 01:34:45 2016 +0200

empty commit (calculateAll)

Change-Id: I12f3c4bad4c83e76ccf8f6cccf1d81d7645fbb39
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' -

2016-05-17 Thread László Németh
 0 files changed

New commits:
commit c61cc4533197ea311103d2716f00c1e007e14a58
Author: László Németh 
Date:   Tue May 17 14:48:16 2016 +0200

empty commit (non-determ. sched.)

Change-Id: I6dad39f08a141a3636aef505386c76adac0892a4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/source vcl/win

2016-05-17 Thread Michael Stahl
 vcl/source/app/svapp.cxx   |7 +--
 vcl/win/source/app/salinst.cxx |5 -
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 5ff11f229b03eaca93880abed65e925fda3a661b
Author: Michael Stahl 
Date:   Tue May 3 17:17:52 2016 +0200

tdf#99383 vcl: don't dispatch events from SolarMutexReleaser

Having SolarMutexReleaser effectively do Reschedule() on WNT and not on
other platforms doesn't seem such a good idea.  Let's try to restrict it
so that it still calls ImplSalYieldMutexAcquireWithWait() but no longer
dispatches messages, timers and idles.

(regression from 482c52e91fe41a52e68827e9bf64a9736427d517)

Change-Id: I52a2c88e9c2473e35909bf270b9e3ae7acbe0d17
(cherry picked from commit ea3ce0b3073c72f474365e438ddabd19de915b76)
Reviewed-on: https://gerrit.libreoffice.org/24623
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a18b91e..a5a01a1 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -515,8 +515,11 @@ inline bool ImplYield(bool i_bWait, bool i_bAllEvents, 
sal_uLong const nReleased
 
 DBG_TESTSOLARMUTEX(); // must be locked on return from Yield
 
-// Process all Tasks
-Scheduler::ProcessTaskScheduling(eResult == SalYieldResult::EVENT);
+if (nReleased == 0) // tdf#99383 don't run stuff from ReAcquireSolarMutex
+{
+// Process all Tasks
+Scheduler::ProcessTaskScheduling(eResult == SalYieldResult::EVENT);
+}
 
 // flush lazy deleted objects
 if( pSVData->maAppData.mnDispatchLevel == 0 )
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 5cf6c3d..40e44d2 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -696,7 +696,10 @@ SalYieldResult WinSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents,
 }
 else
 {
-eDidWork = ImplSalYield( bWait, bHandleAllCurrentEvents );
+if (nReleased == 0) // tdf#99383 ReAcquireSolarMutex shouldn't Yield
+{
+eDidWork = ImplSalYield( bWait, bHandleAllCurrentEvents );
+}
 
 n = nCount;
 while ( n )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - basegfx/source include/basegfx vcl/opengl

2016-05-16 Thread Tomaž Vajngerl
 basegfx/source/polygon/b2dlinegeometry.cxx  |   29 
 basegfx/source/polygon/b2dpolygon.cxx   |2 -
 include/basegfx/polygon/b2dlinegeometry.hxx |5 
 vcl/opengl/gdiimpl.cxx  |4 ---
 4 files changed, 2 insertions(+), 38 deletions(-)

New commits:
commit 83492787b251cd6c475dce7640fee2d70fbd67f3
Author: Tomaž Vajngerl 
Date:   Mon May 16 22:25:15 2016 +0900

tdf#99130 use subdivision on B2DPolygon, angle based subdivision

Remove the subdivider we used until now as there is a better
way to subdivide a polygon with getDefaultAdaptiveSubdivision,
which in additiona also caches the result. The subdivider used in
getDefaultAdaptiveSubdivision was a limited count based subdivider
so this exchanges that with an angle based one which gives much
better results.

Change-Id: I95c009ccf3d54305df0d8eef177cab0df0a23bea

diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx 
b/basegfx/source/polygon/b2dlinegeometry.cxx
index a3095ca..c259fef 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -779,35 +779,6 @@ namespace basegfx
 
 namespace tools
 {
-B2DPolygon polygonSubdivide(const B2DPolygon& rCandidate, double 
fMaxAllowedAngle, double fMaxPartOfEdge)
-{
-if(fMaxAllowedAngle > F_PI2)
-{
-fMaxAllowedAngle = F_PI2;
-}
-else if(fMaxAllowedAngle < 0.01 * F_PI2)
-{
-fMaxAllowedAngle = 0.01 * F_PI2;
-}
-
-if(fMaxPartOfEdge > 1.0)
-{
-fMaxPartOfEdge = 1.0;
-}
-else if(fMaxPartOfEdge < 0.01)
-{
-fMaxPartOfEdge = 0.01;
-}
-
-B2DPolygon aCandidate(rCandidate);
-const double fMaxCos(cos(fMaxAllowedAngle));
-
-aCandidate.removeDoublePoints();
-aCandidate = subdivideToSimple(aCandidate, fMaxCos * fMaxCos, 
fMaxPartOfEdge * fMaxPartOfEdge);
-
-return aCandidate;
-}
-
 B2DPolyPolygon createAreaGeometry(
 const B2DPolygon& rCandidate,
 double fHalfLineWidth,
diff --git a/basegfx/source/polygon/b2dpolygon.cxx 
b/basegfx/source/polygon/b2dpolygon.cxx
index f46c377..5ad06ea 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -483,7 +483,7 @@ public:
 {
 if(!mpDefaultSubdivision)
 {
-const_cast< ImplBufferedData* 
>(this)->mpDefaultSubdivision.reset(new 
basegfx::B2DPolygon(basegfx::tools::adaptiveSubdivideByCount(rSource, 9)));
+const_cast< ImplBufferedData* 
>(this)->mpDefaultSubdivision.reset(new 
basegfx::B2DPolygon(basegfx::tools::adaptiveSubdivideByAngle(rSource)));
 }
 
 return *mpDefaultSubdivision;
diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx 
b/include/basegfx/polygon/b2dlinegeometry.hxx
index 0c9b7b1..cdcd322 100644
--- a/include/basegfx/polygon/b2dlinegeometry.hxx
+++ b/include/basegfx/polygon/b2dlinegeometry.hxx
@@ -139,11 +139,6 @@ namespace basegfx
 double fMaxPartOfEdge = 0.4,
 double fMiterMinimumAngle = (15.0 * F_PI180));
 
-BASEGFX_DLLPUBLIC B2DPolygon polygonSubdivide(
-const B2DPolygon& rCandidate,
-double fMaxAllowedAngle = (12.5 * F_PI180),
-double fMaxPartOfEdge = 0.4);
-
 } // end of namespace tools
 } // end of namespace basegfx
 
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 424f4be..2beb5fe 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2045,9 +2045,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
 basegfx::B2DPolygon aPolygon(rPolygon);
 
 if (aPolygon.areControlPointsUsed())
-aPolygon = basegfx::tools::polygonSubdivide(aPolygon, 7.5 * 
F_PI180);
-else
-aPolygon.removeDoublePoints();
+aPolygon = aPolygon.getDefaultAdaptiveSubdivision();
 
 DrawPolyLine(aPolygon, fLineWidth, eLineJoin, eLineCap);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/inc vcl/opengl vcl/source

2016-05-15 Thread Tomaž Vajngerl
 vcl/inc/opengl/RenderState.hxx  |   27 
 vcl/inc/opengl/program.hxx  |5 +
 vcl/opengl/gdiimpl.cxx  |  116 +++-
 vcl/opengl/program.cxx  |   45 -
 vcl/source/opengl/OpenGLContext.cxx |6 +
 5 files changed, 115 insertions(+), 84 deletions(-)

New commits:
commit b629300695bcb148d2ff293875cb71089d19532a
Author: Tomaž Vajngerl 
Date:   Thu May 12 13:37:11 2016 +0900

opengl: track the state of blend, DrawArrays on OpenGLProgram

This adds tracking of GL_BLEND and glBlendFunc which are usually
set when setting up the current draw call on OpenGLProgram with
SetBlendFunc method.

Until now the final draw call (glDrawArrays) was called outside
of OpenGLProgram. This is a problem because we need to know if
we did call SetBlendFunc or not between when we used or reused
the current program. So we added DrawArrays to OpenGLProgram and
refactored all draw calls in OpenGLSalGraphicsImpl to use this.

From now on glDrawArrays should not be called directly but always
through OpenGLProgram.

Change-Id: I530b4b948af8a962669a3751e1a95ff3986ffec9

diff --git a/vcl/inc/opengl/RenderState.hxx b/vcl/inc/opengl/RenderState.hxx
index ac215a8..2930ff1 100644
--- a/vcl/inc/opengl/RenderState.hxx
+++ b/vcl/inc/opengl/RenderState.hxx
@@ -117,11 +117,36 @@ public:
 static std::string className() { return std::string("StencilState"); }
 };
 
+class BlendState : public GenericCapabilityState
+{
+GLenum mnSourceMode;
+GLenum mnDestinationMode;
+public:
+BlendState()
+: mnSourceMode(GL_ZERO)
+, mnDestinationMode(GL_ZERO)
+{}
+
+static std::string className() { return std::string("BlendState"); }
+
+void func(GLenum nSource, GLenum nDestination)
+{
+if (mnSourceMode != nSource || mnDestinationMode != nDestination)
+{
+glBlendFunc(nSource, nDestination);
+CHECK_GL_ERROR();
+mnSourceMode = nSource;
+mnDestinationMode = nDestination;
+}
+}
+};
+
 class RenderState
 {
 TextureState maTexture;
 ScissorState maScissor;
 StencilState maStencil;
+BlendState   maBlend;
 
 Rectangle maCurrentViewport;
 
@@ -142,12 +167,14 @@ public:
 TextureState& texture() { return maTexture; }
 ScissorState& scissor() { return maScissor; }
 StencilState& stencil() { return maStencil; }
+BlendState&   blend()   { return maBlend; }
 
 void sync()
 {
 VCL_GL_INFO("RenderState::sync");
 maScissor.sync();
 maStencil.sync();
+maBlend.sync();
 }
 };
 
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 780cba7..5944c72 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -51,9 +51,12 @@ public:
 OpenGLProgram();
 ~OpenGLProgram();
 
+GLuint Id() { return mnId; }
+
 bool Load( const OUString& rVertexShader, const OUString& rFragmentShader,
const rtl::OString& preamble = "", const rtl::OString& rDigest 
= "" );
 bool Use();
+void Reuse();
 bool Clean();
 
 void SetVertices( const GLvoid* pData );
@@ -81,6 +84,8 @@ public:
 
 bool DrawTexture( const OpenGLTexture& rTexture );
 
+void DrawArrays(GLenum GLenum, std::vector& aVertices);
+
 protected:
 void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* 
pData, GLint nSize = 2 );
 GLuint GetUniformLocation( const OString& rName );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index c6139e8..424f4be 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -626,14 +626,12 @@ void OpenGLSalGraphicsImpl::DrawPoint( long nX, long nY )
 {
 OpenGLZone aZone;
 
-GLfloat pPoint[2];
-
-pPoint[0] = GLfloat(nX);
-pPoint[1] = GLfloat(nY);
+std::vector pPoint {
+GLfloat(nX), GLfloat(nY)
+};
 
 ApplyProgramMatrices(0.5f);
-mpProgram->SetVertices( pPoint );
-glDrawArrays( GL_POINTS, 0, 1 );
+mpProgram->DrawArrays(GL_POINTS, pPoint);
 CHECK_GL_ERROR();
 }
 
@@ -641,16 +639,13 @@ void OpenGLSalGraphicsImpl::DrawLine( double nX1, double 
nY1, double nX2, double
 {
 OpenGLZone aZone;
 
-GLfloat pPoints[4];
-
-pPoints[0] = GLfloat(nX1);
-pPoints[1] = GLfloat(nY1);
-pPoints[2] = GLfloat(nX2);
-pPoints[3] = GLfloat(nY2);
+std::vector pPoint {
+GLfloat(nX1), GLfloat(nY1),
+GLfloat(nX2), GLfloat(nY2)
+};
 
 ApplyProgramMatrices(0.5f);
-mpProgram->SetVertices( pPoints );
-glDrawArrays( GL_LINES, 0, 2 );
+mpProgram->DrawArrays(GL_LINES, pPoint);
 CHECK_GL_ERROR();
 }
 
@@ -722,8 +717,7 @@ void OpenGLSalGraphicsImpl::DrawLineCap(float x1, float y1, 
float x2, float y2,
 
 ApplyProgramMatrices(0.0f);
 mpProgram->SetExtrusionVectors(aExtrusionVectors.data());
-

[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits -

2016-05-15 Thread László Németh
 0 files changed

New commits:
commit f41cb44d96a91651ad95ebf1c00ed2f62a0e525f
Author: László Németh 
Date:   Sun May 15 23:40:57 2016 +0200

empty commit (repeat)

Change-Id: Ic854f6559e39450d4c04e6b4616ebd0202f94d16
commit 355fab1a734a10214833b605707ed79a61ae4578
Author: László Németh 
Date:   Sun May 15 23:40:25 2016 +0200

empty commit (more system restart)

Change-Id: Ib5f9ed7c14f5952a0a73374ca756176e6646bc02
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits - include/sfx2 sfx2/source

2016-05-13 Thread Jan Holesovsky
 include/sfx2/bindings.hxx|7 +-
 sfx2/source/control/bindings.cxx |   96 +--
 2 files changed, 36 insertions(+), 67 deletions(-)

New commits:
commit 702718d3b49780c165afe59d2a7de950209dcaa8
Author: Jan Holesovsky 
Date:   Mon Oct 26 08:35:25 2015 +0100

tdf#94236: Change Timer in SfxRequest to an Idle to improve feedback.

This is one of the annoying (and very visible) Timers that should be an Idle
in fact.  This affects things like repainting of the ruler in Writer, zoom 
in
the statusbar, or changes in the toolbars.

Whith this commit in, they should no longer be delayed, instead processed
immediately when possible, which gives much better feedback to the user's
actions.

Change-Id: I17ee85b2c05fa0fcd72f10fc2f7a91b7c2398307

diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index bbe5cc4..1daec4e 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -35,6 +35,7 @@
 
 //  forwards, typedefs, declarations
 
+class Idle;
 class SystemWindow;
 class SfxSlot;
 class SfxSlotServer;
@@ -44,7 +45,6 @@ class SfxItemSet;
 class SfxDispatcher;
 class SfxBindings;
 class SfxBindings_Impl;
-class Timer;
 class SfxWorkWindow;
 class SfxUnoControllerItem;
 struct SfxFoundCache_Impl;
@@ -131,8 +131,9 @@ private:
 const SfxPoolItem *pItem,
 SfxItemState eItemState );
 SAL_DLLPRIVATE SfxStateCache* GetStateCache( sal_uInt16 nId, sal_uInt16 
*pPos);
-DECL_DLLPRIVATE_LINK_TYPED( NextJob, Timer *, void );
-SAL_DLLPRIVATE bool NextJob_Impl(Timer * pTimer);
+
+DECL_DLLPRIVATE_LINK_TYPED(NextJob, Idle *, void);
+SAL_DLLPRIVATE bool NextJob_Impl(Idle * pIdle);
 
 public:
  SfxBindings();
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 98388a8..49f4b17 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -71,15 +71,8 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 
-static sal_uInt16 nTimeOut = 300;
-
-#define TIMEOUT_FIRST   nTimeOut
-#define TIMEOUT_UPDATING 20
-
 typedef std::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
 
-
-
 typedef std::vector SfxStateCacheArr_Impl;
 
 struct SfxFoundCache_Impl
@@ -217,7 +210,7 @@ public:
 boolbAllMsgDirty;   //  Has a MessageServer been 
invalidated?
 boolbAllDirty;  // After InvalidateAll
 boolbCtrlReleased;  // while EnterRegistrations
-AutoTimer   aTimer; // for volatile Slots
+IdlemaIdle; // for volatile Slots
 boolbInUpdate;  // for Assertions
 boolbInNextJob; // for Assertions
 boolbFirstRound;// First round in Update
@@ -252,9 +245,10 @@ SfxBindings::SfxBindings()
 // all caches are valid (no pending invalidate-job)
 // create the list of caches
 pImp->pCaches = new SfxStateCacheArr_Impl;
-pImp->aTimer.SetTimeoutHdl( LINK(this, SfxBindings, NextJob) );
-}
 
+pImp->maIdle.SetPriority(SchedulerPriority::MEDIUM);
+pImp->maIdle.SetIdleHdl(LINK(this, SfxBindings, NextJob));
+}
 
 
 SfxBindings::~SfxBindings()
@@ -277,7 +271,9 @@ SfxBindings::~SfxBindings()
 
 ENTERREGISTRATIONS();
 
-pImp->aTimer.Stop();
+pImp->maIdle.SetIdleHdl(Link());
+pImp->maIdle.Stop();
+
 DeleteControllers_Impl();
 
 // Delete Caches
@@ -702,11 +698,11 @@ void SfxBindings::InvalidateAll
 (*pImp->pCaches)[n]->Invalidate(bWithMsg);
 
 pImp->nMsgPos = 0;
+
 if ( !nRegLevel )
 {
-pImp->aTimer.Stop();
-pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
-pImp->aTimer.Start();
+pImp->maIdle.Stop();
+pImp->maIdle.Start();
 }
 }
 
@@ -754,11 +750,11 @@ void SfxBindings::Invalidate
 
 // if not enticed to start update timer
 pImp->nMsgPos = 0;
+
 if ( !nRegLevel )
 {
-pImp->aTimer.Stop();
-pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
-pImp->aTimer.Start();
+pImp->maIdle.Stop();
+pImp->maIdle.Start();
 }
 }
 
@@ -808,11 +804,11 @@ void SfxBindings::InvalidateShell
 pCache->Invalidate(false);
 }
 pImp->nMsgPos = 0;
+
 if ( !nRegLevel )
 {
-pImp->aTimer.Stop();
-pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
-pImp->aTimer.Start();
+pImp->maIdle.Stop();
+pImp->maIdle.Start();
 pImp->bFirstRound = true;
 pImp->nFirstShell = nLevel;
 }
@@ -845,11 +841,11 @@ void SfxBindings::Invalidate
 {
 pCache->Invalidate(false);
 pImp->nMsgPos = std::min(GetSlotPos(nId), pImp->nMsgPos);
+
 if ( 

[Libreoffice-commits] core.git: Branch 'feature/fixes21' - 2 commits -

2016-05-12 Thread László Németh
 0 files changed

New commits:
commit 5e25223130e940792f2b8d6f6f594fb2b0f2cc7b
Author: László Németh 
Date:   Fri May 13 02:49:15 2016 +0200

empty commit (repeat)

Change-Id: I0390813e0e8f219dc62bce88fda1d4ad32999432
commit dcc8ab2ea696af7b372c4f5d59c7b5866b5195a6
Author: László Németh 
Date:   Fri May 13 02:48:54 2016 +0200

empty commit (system restart)

Change-Id: I987cb91972a24fff5bc500dceee574e834b02ef1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/source

2016-05-12 Thread Tomaž Vajngerl
 vcl/source/control/scrbar.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 000eec6e2f9e08a0f2dc1dbfb9b2e2248595fc38
Author: Tomaž Vajngerl 
Date:   Thu Apr 28 15:09:16 2016 +0900

tdf#99574 fix sluggish scrollbar for an immediate paint

Change-Id: I34e87ac580aa1ddb6bc3851bbe99689189c787f6
(cherry picked from commit 9f0e3802e621fb02efde1778c151b93630cdd2fa)

diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 5d44cd7..9fb2e3f 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -863,6 +863,11 @@ void ScrollBar::ImplDragThumb( const Point& rMousePos )
 ImplUpdateRects();
 if ( mbFullDrag && (nOldPos != mnThumbPos) )
 {
+// When dragging in windows the repaint request gets starved so 
dragging
+// the scrollbar feels slower than it actually is. Let's force an 
immediate
+// repaint of the scrollbar.
+ImplDraw(*this, SCRBAR_DRAW_ALL);
+
 mnDelta = mnThumbPos-nOldPos;
 Scroll();
 mnDelta = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes21' - vcl/source

2016-05-12 Thread Jan Holesovsky
 vcl/source/app/timer.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit bf8ab28bb30432d017395f783abdb6f23d9ebbc8
Author: Jan Holesovsky 
Date:   Thu May 12 12:19:21 2016 +0200

Implement deterministic mode where only Idles are being processed.

Change-Id: Id9d5c7d9c7ca5ad45453714b84156f1a90507d91

diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 1766d7f..1ac0243 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -90,6 +90,10 @@ void Timer::Invoke()
 
 void Timer::Start()
 {
+static bool bDeterministic = getenv("SAL_DETERMINISTIC_SCHEDULING");
+if (bDeterministic)
+return;
+
 Scheduler::Start();
 Scheduler::ImplStartTimer(mnTimeout);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits