cui/uiconfig/ui/optmemorypage.ui | 9 ++++++++- svtools/source/graphic/grfmgr2.cxx | 11 ++--------- vcl/source/opengl/OpenGLContext.cxx | 28 ++++++++++++++++++++++------ 3 files changed, 32 insertions(+), 16 deletions(-)
New commits: commit 49188c5a71d9a60ab71bbeb1c9af239cbb8cee09 Author: Zolnai Tamás <[email protected]> Date: Fri Nov 21 11:08:13 2014 +0100 Don't use a hard coded limit for size based auto swap out. Now the graphic cache settings shows the real memory usage for the users, so we can bequeth the decision of the limit to them. Default is 200 MB. See also: dbdacc73ae154237314d599194cc686bd738a9bf Change-Id: I463d31254f6f1836e1584d5acd692f38a97bfe39 (cherry picked from commit a87b1b07b91960601c7f39e2b40eba8ad50b1667) diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 3b6a738..f469623 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -200,15 +200,8 @@ namespace void GraphicManager::ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGraphicToIgnore) { // detect maximum allowed memory footprint. Use the user-settings of MaxCacheSize (defaulted - // to 200MB). Limit to a useful maximum for 32Bit address space - - // max at 500MB; I experimented with 800 for debug and 750 for non-debug settings (pics start - // missing when office reaches a mem footprint of 1.5GB) but some secure left over space for - // app activity is needed - static sal_uLong aMaxSize32Bit(500 * 1024 * 1024); - - // calc max allowed cache size - const sal_uLong nMaxCacheSize(::std::min(GetMaxCacheSize(), aMaxSize32Bit)); + // to 200MB). + const sal_uLong nMaxCacheSize(GetMaxCacheSize()); if(mnUsedSize > nMaxCacheSize) { commit a395c0d93cef9918a9c8d798b7fb7433ba7b5131 Author: Zolnai Tamás <[email protected]> Date: Fri Nov 21 11:04:37 2014 +0100 Do not limit graphic cache size setting to 256 MB. Change-Id: I62835721225cc39dd9fd5131843d57497794be95 (cherry picked from commit 356006b4967fad26c7edd2126860abf01206fdbd) diff --git a/cui/uiconfig/ui/optmemorypage.ui b/cui/uiconfig/ui/optmemorypage.ui index 4646cda..d17f5ea 100644 --- a/cui/uiconfig/ui/optmemorypage.ui +++ b/cui/uiconfig/ui/optmemorypage.ui @@ -23,6 +23,13 @@ <property name="step_increment">1</property> <property name="page_increment">10</property> </object> + <object class="GtkAdjustment" id="adjustment4"> + <property name="lower">1</property> + <property name="upper">4096</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> <object class="GtkBox" id="OptMemoryPage"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -182,7 +189,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">â¢</property> - <property name="adjustment">adjustment2</property> + <property name="adjustment">adjustment4</property> </object> <packing> <property name="left_attach">1</property> commit 5fe32c21ab8aebaaf8b93c042c2835c4152871e6 Author: Zolnai Tamás <[email protected]> Date: Thu Nov 20 12:07:10 2014 +0100 OpenGLContext stopped to support multisampling under linux. glTF rendering needs to have a context with multisampling so it also became broken. Regresssion from: 07c0396ab9c94be5af392827f56f0d91551f3e25 This breaker change was made assuming getVisual{Info}() is always called after the SystemChildWindow is already created, but generateWinData() is run as part of the new child window creation. It's aim to choose the best visual / FBConfig which potentially support multisampling. Change-Id: Ic881c6769260b5eaa9fed2552eca882191f6c56d (cherry picked from commit d85b975667dfba755b9c952a2b8030a7f33bba66) diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index d1c1b72..dac3b5c 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -463,8 +463,7 @@ GLXFBConfig* getFBConfigForPixmap(Display* dpy, int& nBestFBC, bool bUseDoubleBu return pFBC; } -#ifdef DBG_UTIL -GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubleBufferedRendering) +GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubleBufferedRendering, bool bWithSameVisualID) { if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) return NULL; @@ -513,7 +512,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl for(int i = 0; i < fbCount; ++i) { XVisualInfo* pVi = glXGetVisualFromFBConfig( dpy, pFBC[i] ); - if(pVi && pVi->visualid == xattr.visual->visualid) + if(pVi && (!bWithSameVisualID || pVi->visualid == xattr.visual->visualid) ) { // pick the one with the most samples per pixel int nSampleBuf = 0; @@ -532,7 +531,6 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl return pFBC; } -#endif // we need them before glew can initialize them // glew needs an OpenGL context so we need to get the address manually @@ -662,7 +660,7 @@ bool OpenGLContext::ImplInit() if (!mbPixmap && glXCreateContextAttribsARB && !mbRequestLegacyContext) { int best_fbc = -1; - GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering); + GLXFBConfig* pFBC = getFBConfig(m_aGLWin.dpy, m_aGLWin.win, best_fbc, mbUseDoubleBufferedRendering, true); if (!pFBC) return false; @@ -1140,7 +1138,25 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool) if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) return aWinData; - aWinData.pVisual = getVisual(dpy, win); + initOpenGLFunctionPointers(); + + int best_fbc = -1; + GLXFBConfig* pFBC = getFBConfig(dpy, win, best_fbc, true, false); + + if (!pFBC) + return aWinData; + + XVisualInfo* vi = 0; + if( best_fbc != -1 ) + vi = glXGetVisualFromFBConfig( dpy, pFBC[best_fbc] ); + + XFree(pFBC); + + if( vi ) + { + SAL_INFO("vcl.opengl", "using VisualID " << vi->visualid); + aWinData.pVisual = (void*)(vi->visual); + } return aWinData; }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
