fix headless build
disables OpenGL and glew usage, lets --without-gui do what --without-x did before and disables X related test Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb Reviewed-on: https://gerrit.libreoffice.org/23474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
This commit is contained in:
+8
-1
@@ -543,7 +543,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
||||
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
|
||||
$(if $(ENABLE_GSTREAMER_0_10),avmediagst_0_10) \
|
||||
$(if $(ENABLE_DIRECTX),avmediawin) \
|
||||
$(if $(ENABLE_GLTF),avmediaogl) \
|
||||
cached1 \
|
||||
collator_data \
|
||||
comphelper \
|
||||
@@ -606,6 +605,14 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
||||
) \
|
||||
))
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
ifeq ($(ENABLE_GLTF),TRUE)
|
||||
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
||||
avmediaogl \
|
||||
))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexbinarytable, \
|
||||
$(if $(DISABLE_ACTIVEX),,\
|
||||
|
||||
@@ -183,6 +183,7 @@ endef
|
||||
|
||||
endif # SYSTEM_CPPUNIT
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
ifneq ($(SYSTEM_GLEW),)
|
||||
|
||||
define gb_LinkTarget__use_glew
|
||||
@@ -228,6 +229,7 @@ $(call gb_ExternalProject_use_external_project,$(1),glew)
|
||||
endef
|
||||
|
||||
endif # SYSTEM_GLEW
|
||||
endif # ENABLE_OPENGL
|
||||
|
||||
ifneq ($(SYSTEM_GLYPHY),)
|
||||
|
||||
|
||||
@@ -25,9 +25,15 @@ $(eval $(call gb_Library_add_defs,avmedia,\
|
||||
|
||||
$(eval $(call gb_Library_use_externals,avmedia,\
|
||||
boost_headers \
|
||||
glew \
|
||||
))
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,avmedia,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,avmedia,\
|
||||
comphelper \
|
||||
ucbhelper \
|
||||
@@ -45,10 +51,12 @@ $(eval $(call gb_Library_use_libraries,avmedia,\
|
||||
))
|
||||
|
||||
ifeq ($(ENABLE_GLTF),TRUE)
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_add_exception_objects,avmedia,\
|
||||
avmedia/source/framework/modeltools \
|
||||
))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_COLLADA),TRUE)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_Library,avmediaogl))
|
||||
|
||||
$(eval $(call gb_Library_set_componentfile,avmediaogl,avmedia/source/opengl/avmediaogl))
|
||||
@@ -56,5 +57,5 @@ $(eval $(call gb_Library_add_libs,avmediaogl,\
|
||||
-lGL \
|
||||
))
|
||||
endif
|
||||
|
||||
endif
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
||||
@@ -55,7 +55,7 @@ $(eval $(call gb_Module_add_targets,avmedia,\
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_GLTF),TRUE)
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Module_add_targets,avmedia,\
|
||||
Library_avmediaogl \
|
||||
))
|
||||
|
||||
@@ -39,8 +39,9 @@
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/media/XManager.hpp>
|
||||
#include <vcl/sysdata.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
|
||||
#endif
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
namespace avmedia { namespace priv {
|
||||
@@ -223,10 +224,12 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR
|
||||
}
|
||||
}
|
||||
#if HAVE_FEATURE_GLTF
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
else if ( *pMimeType == AVMEDIA_MIMETYPE_JSON )
|
||||
{
|
||||
xPlayer = createPlayer(rURL, AVMEDIA_OPENGL_MANAGER_SERVICE_NAME, xContext);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return xPlayer;
|
||||
|
||||
@@ -39,7 +39,10 @@
|
||||
#include <osl/mutex.hxx>
|
||||
#include <osl/process.h>
|
||||
#include <o3tl/functional.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLWrapper.hxx>
|
||||
#endif
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -309,8 +312,10 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
|
||||
"ForceSafeServiceImpl" );
|
||||
|
||||
// tdf#93870 - force VCL canvas in OpenGL mode for now.
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if( OpenGLWrapper::isVCLOpenGLEnabled() )
|
||||
bForceLastEntry = true;
|
||||
#endif
|
||||
|
||||
// use anti-aliasing canvas, if config flag set (or not existing)
|
||||
bool bUseAAEntry(true);
|
||||
|
||||
@@ -28,9 +28,14 @@ $(eval $(call gb_Library_set_precompiled_header,chartcore,$(SRCDIR)/chart2/inc/p
|
||||
$(eval $(call gb_Library_use_externals,chartcore,\
|
||||
boost_headers \
|
||||
glm_headers \
|
||||
glew \
|
||||
))
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,chartcore,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_use_custom_headers,chartcore,\
|
||||
officecfg/registry \
|
||||
))
|
||||
@@ -82,7 +87,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
chart2/source/view/axes/VPolarCoordinateSystem \
|
||||
chart2/source/view/axes/VPolarGrid \
|
||||
chart2/source/view/axes/VPolarRadiusAxis \
|
||||
chart2/source/view/charttypes/GL3DBarChart \
|
||||
chart2/source/view/charttypes/AreaChart \
|
||||
chart2/source/view/charttypes/BarChart \
|
||||
chart2/source/view/charttypes/BarPositionHelper \
|
||||
@@ -94,14 +98,11 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
chart2/source/view/charttypes/Splines \
|
||||
chart2/source/view/charttypes/VSeriesPlotter \
|
||||
chart2/source/view/diagram/VDiagram \
|
||||
chart2/source/view/main/3DChartObjects \
|
||||
chart2/source/view/main/ChartItemPool \
|
||||
chart2/source/view/main/ChartView \
|
||||
chart2/source/view/main/Clipping \
|
||||
chart2/source/view/main/DataPointSymbolSupplier \
|
||||
chart2/source/view/main/DrawModelWrapper \
|
||||
chart2/source/view/main/GL3DPlotterBase \
|
||||
chart2/source/view/main/GL3DRenderer \
|
||||
chart2/source/view/main/LabelPositionHelper \
|
||||
chart2/source/view/main/Linear3DTransformation \
|
||||
chart2/source/view/main/PlotterBase \
|
||||
@@ -118,6 +119,14 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
chart2/source/view/main/VPolarTransformation \
|
||||
chart2/source/view/main/VTitle \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
chart2/source/view/main/3DChartObjects \
|
||||
chart2/source/view/main/GL3DPlotterBase \
|
||||
chart2/source/view/main/GL3DRenderer \
|
||||
chart2/source/view/charttypes/GL3DBarChart \
|
||||
))
|
||||
endif
|
||||
|
||||
# model pieces ...
|
||||
$(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
@@ -256,9 +265,14 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,chartcore,\
|
||||
else ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
|
||||
$(eval $(call gb_Library_add_libs,chartcore,\
|
||||
$(DLOPEN_LIBS) \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_add_libs,chartcore,\
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
endif #ENABLE_OPENGL
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
||||
@@ -12,9 +12,13 @@ $(eval $(call gb_Module_Module,chart2))
|
||||
$(eval $(call gb_Module_add_targets,chart2,\
|
||||
Library_chartcontroller \
|
||||
Library_chartcore \
|
||||
Library_chartopengl \
|
||||
Package_opengl \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Module_add_targets,chart2,\
|
||||
Library_chartopengl \
|
||||
Package_opengl \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Module_add_l10n_targets,chart2,\
|
||||
AllLangResTarget_chartcontroller \
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <vcl/help.hxx>
|
||||
#include <vcl/openglwin.hxx>
|
||||
#include <vcl/settings.hxx>
|
||||
|
||||
#include <config_features.h>
|
||||
#include <com/sun/star/chart2/X3DChartWindowProvider.hpp>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
@@ -49,7 +49,11 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
|
||||
: Window(pParent, nStyle)
|
||||
, m_pWindowController( pController )
|
||||
, m_bInPaint(false)
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
, m_pOpenGLWindow(VclPtr<OpenGLWindow>::Create(this))
|
||||
#else
|
||||
, m_pOpenGLWindow(nullptr)
|
||||
#endif
|
||||
{
|
||||
this->SetHelpId( HID_SCH_WIN_DOCUMENT );
|
||||
this->SetMapMode( MapMode(MAP_100TH_MM) );
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
#include "StockChartTypeTemplate.hxx"
|
||||
#include "NetChartTypeTemplate.hxx"
|
||||
#include "BubbleChartTypeTemplate.hxx"
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include "GL3DBarChartTypeTemplate.hxx"
|
||||
#endif
|
||||
#include <cppuhelper/component_context.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <comphelper/InlineContainer.hxx>
|
||||
@@ -534,14 +537,16 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
|
||||
case TEMPLATE_BUBBLE:
|
||||
xTemplate.set( new BubbleChartTypeTemplate( m_xContext, aServiceSpecifier ));
|
||||
break;
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
case TEMPLATE_GL3DBAR:
|
||||
xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
|
||||
break;
|
||||
case TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE:
|
||||
xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
|
||||
break;
|
||||
|
||||
#else
|
||||
default: break;
|
||||
#endif
|
||||
// case TEMPLATE_SURFACE:
|
||||
// case TEMPLATE_ADDIN:
|
||||
// break;
|
||||
|
||||
@@ -50,8 +50,9 @@
|
||||
#include "DateHelper.hxx"
|
||||
#include "defines.hxx"
|
||||
#include <unonames.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <GL3DBarChart.hxx>
|
||||
|
||||
#endif
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <rtl/uuid.h>
|
||||
#include <tools/globname.hxx>
|
||||
@@ -68,8 +69,9 @@
|
||||
#include <osl/mutex.hxx>
|
||||
#include <svx/unofill.hxx>
|
||||
#include <vcl/openglwin.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
|
||||
#endif
|
||||
#include <drawinglayer/XShapeDumper.hxx>
|
||||
|
||||
#include <time.h>
|
||||
@@ -1093,8 +1095,10 @@ GL2DRenderer::GL2DRenderer(ChartView* pView):
|
||||
GL2DRenderer::~GL2DRenderer()
|
||||
{
|
||||
SolarMutexGuard g;
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if(!mbContextDestroyed && mpWindow)
|
||||
mpWindow->setRenderer(nullptr);
|
||||
#endif
|
||||
mpWindow.reset();
|
||||
}
|
||||
|
||||
@@ -1132,6 +1136,7 @@ void GL2DRenderer::updateOpenGLWindow()
|
||||
return;
|
||||
|
||||
OpenGLWindow* pWindow = mpView->mrChartModel.getOpenGLWindow();
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if(pWindow != mpWindow)
|
||||
{
|
||||
if(mpWindow)
|
||||
@@ -1144,6 +1149,7 @@ void GL2DRenderer::updateOpenGLWindow()
|
||||
pWindow->setRenderer(this);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
mpWindow = pWindow;
|
||||
}
|
||||
|
||||
@@ -2593,8 +2599,11 @@ void ChartView::impl_refreshAddIn()
|
||||
bool ChartView::isReal3DChart()
|
||||
{
|
||||
uno::Reference< XDiagram > xDiagram( mrChartModel.getFirstDiagram() );
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
return ChartHelper::isGL3DDiagram(xDiagram);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static const char* envChartDummyFactory = getenv("CHART_DUMMY_FACTORY");
|
||||
@@ -2637,7 +2646,7 @@ void ChartView::createShapes()
|
||||
}
|
||||
pShapeFactory->setPageSize(mxRootShape, aPageSize);
|
||||
pShapeFactory->clearPage(mxRootShape);
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#if HAVE_FEATURE_DESKTOP
|
||||
if(isReal3DChart())
|
||||
{
|
||||
@@ -2653,6 +2662,7 @@ void ChartView::createShapes()
|
||||
if(pWindow && !envChartDummyFactory)
|
||||
pWindow->Show(false);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
createShapes2D(aPageSize);
|
||||
@@ -2672,6 +2682,7 @@ void ChartView::createShapes()
|
||||
|
||||
void ChartView::render()
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if(!isReal3DChart())
|
||||
{
|
||||
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
|
||||
@@ -2685,6 +2696,7 @@ void ChartView::render()
|
||||
pShapeFactory->postRender(pWindow);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// util::XEventListener (base of XCloseListener)
|
||||
@@ -3371,6 +3383,7 @@ void ChartView::createShapes3D()
|
||||
|
||||
uno::Reference< XChartType > xChartType( aChartTypeList[0] );
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if (!m_pGL3DPlotter)
|
||||
{
|
||||
m_pGL3DPlotter.reset(new GL3DBarChart(xChartType, pWindow));
|
||||
@@ -3381,6 +3394,7 @@ void ChartView::createShapes3D()
|
||||
if (pChart)
|
||||
pChart->setOpenGLWindow(pWindow);
|
||||
}
|
||||
#endif
|
||||
|
||||
uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
|
||||
OSL_ASSERT( xDataSeriesContainer.is());
|
||||
@@ -3400,9 +3414,11 @@ void ChartView::createShapes3D()
|
||||
|
||||
std::unique_ptr<ExplicitCategoriesProvider> pCatProvider(new ExplicitCategoriesProvider(xCooSys, mrChartModel));
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
m_pGL3DPlotter->create3DShapes(aDataSeries, *pCatProvider);
|
||||
|
||||
m_pGL3DPlotter->render();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChartView::updateOpenGLWindow()
|
||||
|
||||
@@ -152,8 +152,18 @@
|
||||
#define HAVE_FEATURE_BREAKPAD 0
|
||||
|
||||
/*
|
||||
* Whether to enable ATL
|
||||
*/
|
||||
* * Whether to enable ATL
|
||||
* */
|
||||
#define HAVE_FEATURE_ATL 0
|
||||
|
||||
/*
|
||||
* Whether OpenGL is enabled
|
||||
* */
|
||||
#define HAVE_FEATURE_OPENGL 0
|
||||
|
||||
/*
|
||||
* Whether User Interface is available
|
||||
*/
|
||||
#define HAVE_FEATURE_UI 1
|
||||
|
||||
#endif
|
||||
|
||||
+9
-10
@@ -3760,7 +3760,6 @@ if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
|
||||
AC_MSG_CHECKING([whether to use ATL])
|
||||
if test "$enable_atl" = "yes" -o "$enable_atl" = "" -a "$vcexpress" != Express; then
|
||||
DISABLE_ATL=""
|
||||
AC_DEFINE(HAVE_FEATURE_ATL, 1)
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
DISABLE_ATL="TRUE"
|
||||
@@ -4572,12 +4571,17 @@ if test "$with_x" = "no"; then
|
||||
AC_MSG_ERROR([Use --disable-gui instead. How can we get rid of this option? No idea where it comes from.])
|
||||
fi
|
||||
|
||||
ENABLE_HEADLESS=""
|
||||
if test "$enable_gui" = "no"; then
|
||||
if test "$USING_X11" != TRUE; then
|
||||
AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --disable-gui.])
|
||||
fi
|
||||
USING_X11=
|
||||
ENABLE_HEADLESS=TRUE
|
||||
AC_DEFINE(HAVE_FEATURE_UI,0)
|
||||
test_cairo=yes
|
||||
fi
|
||||
AC_SUBST(ENABLE_HEADLESS)
|
||||
|
||||
WORKDIR="${BUILDDIR}/workdir"
|
||||
INSTDIR="${BUILDDIR}/instdir"
|
||||
@@ -10138,13 +10142,6 @@ if test "x$enable_kde4" = "xyes"; then
|
||||
fi
|
||||
AC_SUBST(ENABLE_KDE4)
|
||||
|
||||
ENABLE_HEADLESS=""
|
||||
if test "x$with_x" = "xno" -o "$CXX" = "emcc"; then
|
||||
ENABLE_HEADLESS="TRUE"
|
||||
SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
|
||||
R="headless"
|
||||
fi
|
||||
AC_SUBST(ENABLE_HEADLESS)
|
||||
|
||||
build_vcl_plugins="$R"
|
||||
if test -z "$build_vcl_plugins"; then
|
||||
@@ -10431,16 +10428,18 @@ if test $_os = iOS -o $_os = Android; then
|
||||
elif test "$_os" = "Darwin"; then
|
||||
# We use frameworks on Mac OS X, no need for detail checks
|
||||
ENABLE_OPENGL=TRUE
|
||||
AC_DEFINE(HAVE_FEATURE_OPENGL,1)
|
||||
ENABLE_OPENGL_CANVAS=TRUE
|
||||
elif test $_os = WINNT; then
|
||||
ENABLE_OPENGL=TRUE
|
||||
AC_DEFINE(HAVE_FEATURE_OPENGL,1)
|
||||
ENABLE_OPENGL_CANVAS=TRUE
|
||||
else
|
||||
if test "$USING_X11" = TRUE; then
|
||||
ENABLE_OPENGL=TRUE
|
||||
AC_CHECK_LIB(GL, glBegin, [:], AC_MSG_ERROR([libGL required.]))
|
||||
AC_DEFINE(HAVE_FEATURE_OPENGL,1)
|
||||
ENABLE_OPENGL_CANVAS=TRUE
|
||||
fi
|
||||
ENABLE_OPENGL_CANVAS=TRUE
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_OPENGL)
|
||||
|
||||
+5
-1
@@ -69,8 +69,12 @@ $(eval $(call gb_Library_use_externals,cui,\
|
||||
boost_headers \
|
||||
icuuc \
|
||||
icu_headers \
|
||||
glew \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,cui,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Library_use_system_win32_libs,cui,\
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <config_features.h>
|
||||
#include <svl/zforlist.hxx>
|
||||
#include <svl/currencytable.hxx>
|
||||
#include <svtools/grfmgr.hxx>
|
||||
@@ -89,8 +90,9 @@
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/settings.hxx>
|
||||
#include <vcl/IconThemeInfo.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLWrapper.hxx>
|
||||
|
||||
#endif
|
||||
#include "optgdlg.hxx"
|
||||
#include <svx/ofaitem.hxx>
|
||||
#include <svtools/apearcfg.hxx>
|
||||
@@ -511,10 +513,13 @@ CanvasSettings::CanvasSettings() :
|
||||
|
||||
bool CanvasSettings::IsHardwareAccelerationAvailable() const
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if( OpenGLWrapper::isVCLOpenGLEnabled() )
|
||||
mbHWAccelAvailable = false;
|
||||
|
||||
else if( !mbHWAccelChecked )
|
||||
else
|
||||
#endif
|
||||
if( !mbHWAccelChecked )
|
||||
{
|
||||
mbHWAccelChecked = true;
|
||||
|
||||
@@ -980,7 +985,11 @@ void OfaViewTabPage::UpdateOGLStatus()
|
||||
if (Application::GetToolkitName() == "gtk3")
|
||||
return;
|
||||
// Easier than a custom translation string.
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
bool bEnabled = OpenGLWrapper::isVCLOpenGLEnabled();
|
||||
#else
|
||||
bool bEnabled = false;
|
||||
#endif
|
||||
m_pOpenGLStatusEnabled->Show(bEnabled);
|
||||
m_pOpenGLStatusDisabled->Show(!bEnabled);
|
||||
}
|
||||
|
||||
@@ -140,6 +140,13 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
|
||||
desktop/source/lib/lokclipboard \
|
||||
))
|
||||
endif
|
||||
ifeq ($(ENABLE_HEADLESS),TRUE)
|
||||
$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
|
||||
desktop/source/lib/init \
|
||||
desktop/source/lib/lokinteractionhandler \
|
||||
desktop/source/lib/lokclipboard \
|
||||
))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_TELEPATHY),TRUE)
|
||||
|
||||
@@ -95,7 +95,10 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
|
||||
/* Run test for OpenGL support in own process to avoid crash with broken
|
||||
* OpenGL drivers. Start process as early as possible.
|
||||
*/
|
||||
bool bSuccess = fire_glxtest_process();
|
||||
bool bSuccess = false;
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
bSuccess = fire_glxtest_process();
|
||||
#endif
|
||||
SAL_WARN_IF(!bSuccess, "desktop.opengl", "problems with glxtest");
|
||||
#endif
|
||||
|
||||
|
||||
+4
-3
@@ -37,7 +37,8 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
|
||||
$(call gb_ExternalProject_run,build,\
|
||||
./configure \
|
||||
$(if $(debug),STRIP=" ") \
|
||||
CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)" \
|
||||
$(if $(filter ANDROID IOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \
|
||||
$(if $(filter-out ANDROID IOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS)" ) \
|
||||
$(if $(filter ANDROID IOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) \
|
||||
pixman_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,pixman)/pixman" \
|
||||
pixman_LIBS="-L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1" \
|
||||
@@ -45,8 +46,8 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
|
||||
ZLIB3RDLIB="$(if $(SYSTEM_ZLIB),,-L$(WORKDIR)/LinkTarget/StaticLibrary) -lz" \
|
||||
png_REQUIRES="trick_configure_into_using_png_CFLAGS_and_LIBS" \
|
||||
png_CFLAGS="$(LIBPNG_CFLAGS)" png_LIBS="$(LIBPNG_LIBS)" \
|
||||
$(if $(SYSTEM_FREETYPE),,FREETYPE_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,freetype)/include") \
|
||||
FONTCONFIG_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,fontconfig)" \
|
||||
$(if $(SYSTEM_FREETYPE,),FREETYPE_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,freetype)/include") \
|
||||
$(if $(SYSTEM_FONTCONFIG,),FONTCONFIG_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,fontconfig)") \
|
||||
$(if $(filter IOS,$(OS)),--disable-shared,--disable-static) \
|
||||
$(if $(filter ANDROID,$(OS)),--disable-shared,--disable-static) \
|
||||
$(if $(filter ANDROID IOS,$(OS)),--disable-xlib,--enable-xlib) \
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef INCLUDED_VCL_OUTDEV_HXX
|
||||
#define INCLUDED_VCL_OUTDEV_HXX
|
||||
|
||||
#include <config_features.h>
|
||||
#include <tools/gen.hxx>
|
||||
#include <tools/solar.h>
|
||||
#include <tools/rc.hxx>
|
||||
@@ -612,6 +613,7 @@ public:
|
||||
* the underlying SalGraphics and it's implementation
|
||||
* changing.
|
||||
*/
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
class PaintScope {
|
||||
void *pHandle;
|
||||
public:
|
||||
@@ -619,7 +621,7 @@ public:
|
||||
~PaintScope();
|
||||
void flush();
|
||||
};
|
||||
|
||||
#endif
|
||||
protected:
|
||||
|
||||
virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate = false);
|
||||
|
||||
@@ -229,7 +229,7 @@ $(eval $(call gb_Rdb_add_components,services,\
|
||||
wizards/com/sun/star/wizards/report/report \
|
||||
wizards/com/sun/star/wizards/table/table \
|
||||
) \
|
||||
$(if $(ENABLE_GLTF), \
|
||||
$(if $(ENABLE_OPENGL), \
|
||||
$(call gb_Helper_optional,AVMEDIA,avmedia/source/opengl/avmediaogl) \
|
||||
) \
|
||||
))
|
||||
|
||||
@@ -816,8 +816,9 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
|
||||
aPos.X() -= aSize.Width() >> 1;
|
||||
aPos.Y() -= aSize.Height() >> 1;
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
mpView->Insert3DModelURL( sURL, nAction, aPos, aSize ) ;
|
||||
#endif
|
||||
|
||||
if( mpWindow )
|
||||
mpWindow->LeaveWait();
|
||||
|
||||
@@ -292,7 +292,7 @@ void View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
|
||||
|
||||
InsertMediaObj( realURL, "application/vnd.sun.star.media", rAction, rPos, rSize );
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#if HAVE_FEATURE_GLTF
|
||||
void View::Insert3DModelURL(
|
||||
const OUString& rModelURL, sal_Int8& rAction,
|
||||
@@ -311,6 +311,7 @@ void View::Insert3DModelURL(
|
||||
pRetObject->setMediaProperties(aItem);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rMimeType, sal_Int8& rAction,
|
||||
const Point& rPos, const Size& rSize )
|
||||
|
||||
@@ -28,8 +28,12 @@ $(eval $(call gb_Library_set_precompiled_header,slideshow,$(SRCDIR)/slideshow/in
|
||||
|
||||
$(eval $(call gb_Library_use_externals,slideshow,\
|
||||
boost_headers \
|
||||
glew \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,slideshow,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_use_sdk_api,slideshow))
|
||||
|
||||
|
||||
@@ -10,10 +10,14 @@
|
||||
$(eval $(call gb_Module_Module,slideshow))
|
||||
|
||||
$(eval $(call gb_Module_add_targets,slideshow,\
|
||||
$(if $(filter TRUE,$(ENABLE_OPENGL)),Library_OGLTrans) \
|
||||
Library_slideshow \
|
||||
Package_opengl \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Module_add_targets,slideshow,\
|
||||
Library_OGLTrans \
|
||||
Package_opengl \
|
||||
))
|
||||
endif
|
||||
|
||||
# not working
|
||||
# CppunitTest_slideshow \
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
#include <avmedia/mediawindow.hxx>
|
||||
#include <avmedia/modeltools.hxx>
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
#endif
|
||||
|
||||
#include <com/sun/star/media/XManager.hpp>
|
||||
#include <com/sun/star/media/XPlayer.hpp>
|
||||
@@ -449,7 +451,7 @@ namespace slideshow
|
||||
rRangePix.getMinY(),
|
||||
rRangePix.getMaxX() - rRangePix.getMinX(),
|
||||
rRangePix.getMaxY() - rRangePix.getMinY() );
|
||||
#if !HAVE_FEATURE_GLTF
|
||||
#if !HAVE_FEATURE_GLTF || !HAVE_FEATURE_OPENGL
|
||||
(void)rMimeType;
|
||||
#else
|
||||
if( avmedia::IsModel(rMimeType) )
|
||||
|
||||
@@ -84,9 +84,13 @@ $(eval $(call gb_Library_use_externals,svxcore,\
|
||||
boost_headers \
|
||||
icuuc \
|
||||
icu_headers \
|
||||
glew \
|
||||
libxml2 \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,svxcore,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),MACOSX)
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
#include <comphelper/propertysequence.hxx>
|
||||
#include <sfx2/classificationhelper.hxx>
|
||||
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
|
||||
#include <config_features.h>
|
||||
|
||||
static const char* DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/";
|
||||
|
||||
@@ -173,7 +174,9 @@ public:
|
||||
void testUnicodeNotationToggle();
|
||||
void testTextTableCellNames();
|
||||
void testShapeAnchorUndo();
|
||||
#if HAVE_FEATURE_UI
|
||||
void testDde();
|
||||
#endif
|
||||
void testDocModState();
|
||||
void testTdf94804();
|
||||
void testTdf34957();
|
||||
@@ -267,7 +270,9 @@ public:
|
||||
CPPUNIT_TEST(testUnicodeNotationToggle);
|
||||
CPPUNIT_TEST(testTextTableCellNames);
|
||||
CPPUNIT_TEST(testShapeAnchorUndo);
|
||||
#if HAVE_FEATURE_UI
|
||||
CPPUNIT_TEST(testDde);
|
||||
#endif
|
||||
CPPUNIT_TEST(testDocModState);
|
||||
CPPUNIT_TEST(testTdf94804);
|
||||
CPPUNIT_TEST(testTdf34957);
|
||||
@@ -3057,7 +3062,7 @@ void lcl_dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, con
|
||||
|
||||
xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_UI
|
||||
void SwUiWriterTest::testDde()
|
||||
{
|
||||
// Type asdf and copy it.
|
||||
@@ -3081,7 +3086,7 @@ void SwUiWriterTest::testDde()
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(xField, "TextPortionType"));
|
||||
CPPUNIT_ASSERT(xField->getString().endsWith("asdf"));
|
||||
}
|
||||
|
||||
#endif
|
||||
//IdleTask class to add a low priority Idle task
|
||||
class IdleTask
|
||||
{
|
||||
|
||||
@@ -23,9 +23,13 @@ $(eval $(call gb_Library_set_componentfile,tk,toolkit/util/tk))
|
||||
|
||||
$(eval $(call gb_Library_use_externals,tk,\
|
||||
boost_headers \
|
||||
glew \
|
||||
))
|
||||
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,tk,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
$(eval $(call gb_Library_set_include,tk,\
|
||||
$$(INCLUDE) \
|
||||
-I$(SRCDIR)/toolkit/inc \
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <prewin.h>
|
||||
#include <postwin.h>
|
||||
#endif
|
||||
#include <config_features.h>
|
||||
#include <com/sun/star/awt/WindowAttribute.hpp>
|
||||
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
|
||||
#include <com/sun/star/awt/WindowClass.hpp>
|
||||
@@ -113,7 +114,9 @@
|
||||
#include <vcl/window.hxx>
|
||||
#include <vcl/wrkwin.hxx>
|
||||
#include <vcl/throbber.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLWrapper.hxx>
|
||||
#endif
|
||||
#include "toolkit/awt/vclxspinbutton.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
@@ -1922,7 +1925,11 @@ void SAL_CALL VCLXToolkit::processEventsToIdle()
|
||||
sal_Int64 SAL_CALL VCLXToolkit::getOpenGLBufferSwapCounter()
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
return OpenGLWrapper::getBufferSwapCounter();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// css:awt:XToolkitRobot
|
||||
|
||||
@@ -15,9 +15,13 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_bitmap_test, \
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,vcl_bitmap_test,\
|
||||
$$(INCLUDE) \
|
||||
|
||||
@@ -11,9 +11,13 @@ $(eval $(call gb_Executable_Executable,icontest))
|
||||
|
||||
$(eval $(call gb_Executable_use_externals,icontest,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Executable_use_externals,icontest,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Executable_use_api,icontest,\
|
||||
offapi \
|
||||
|
||||
@@ -17,9 +17,13 @@ $(eval $(call gb_Executable_use_api,vcldemo,\
|
||||
|
||||
$(eval $(call gb_Executable_use_externals,vcldemo,\
|
||||
boost_headers \
|
||||
glew \
|
||||
glm_headers \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Executable_use_externals,vcldemo,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Executable_set_include,vcldemo,\
|
||||
$$(INCLUDE) \
|
||||
|
||||
+33
-16
@@ -113,7 +113,6 @@ endif
|
||||
$(eval $(call gb_Library_use_externals,vcl,\
|
||||
boost_headers \
|
||||
gio \
|
||||
glew \
|
||||
glm_headers \
|
||||
harfbuzz \
|
||||
icu_headers \
|
||||
@@ -121,20 +120,14 @@ $(eval $(call gb_Library_use_externals,vcl,\
|
||||
lcms2 \
|
||||
mdds_headers \
|
||||
))
|
||||
ifeq ($(ENABLE_OPENGL),TRUE)
|
||||
$(eval $(call gb_Library_use_externals,vcl,\
|
||||
glew \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_add_exception_objects,vcl,\
|
||||
vcl/opengl/DeviceInfo \
|
||||
vcl/opengl/gdiimpl \
|
||||
vcl/opengl/salbmp \
|
||||
vcl/opengl/scale \
|
||||
vcl/opengl/framebuffer \
|
||||
vcl/opengl/program \
|
||||
vcl/opengl/texture \
|
||||
vcl/opengl/FixedTextureAtlas \
|
||||
vcl/source/opengl/OpenGLContext \
|
||||
vcl/source/opengl/OpenGLHelper \
|
||||
vcl/source/window/cairo_cairo \
|
||||
vcl/source/window/openglwin \
|
||||
vcl/source/window/settings \
|
||||
vcl/source/window/paint \
|
||||
vcl/source/window/resource \
|
||||
@@ -613,9 +606,32 @@ $(eval $(call gb_Library_use_externals,vcl,\
|
||||
freetype \
|
||||
))
|
||||
ifneq ($(OS),EMSCRIPTEN)
|
||||
$(eval $(call gb_Library_use_externals,vcl,\
|
||||
fontconfig \
|
||||
))
|
||||
$(eval $(call gb_Library_use_externals,vcl,\
|
||||
fontconfig \
|
||||
))
|
||||
endif
|
||||
else
|
||||
$(eval $(call gb_Library_add_exception_objects,vcl,\
|
||||
vcl/opengl/DeviceInfo \
|
||||
vcl/opengl/gdiimpl \
|
||||
vcl/opengl/salbmp \
|
||||
vcl/opengl/scale \
|
||||
vcl/opengl/framebuffer \
|
||||
vcl/opengl/program \
|
||||
vcl/opengl/texture \
|
||||
vcl/opengl/FixedTextureAtlas \
|
||||
vcl/source/opengl/OpenGLContext \
|
||||
vcl/source/opengl/OpenGLHelper \
|
||||
vcl/source/window/openglwin \
|
||||
))
|
||||
ifeq ($(OS),LINUX)
|
||||
$(eval $(call gb_Library_add_libs,vcl,\
|
||||
-lm \
|
||||
-ldl \
|
||||
-lpthread \
|
||||
-lGL \
|
||||
-lX11 \
|
||||
))
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -727,11 +743,12 @@ $(eval $(call gb_Library_add_libs,vcl,\
|
||||
-lX11 \
|
||||
-lXext \
|
||||
))
|
||||
|
||||
ifneq ($(ENABLE_HEADLESS),TRUE)
|
||||
$(eval $(call gb_Library_add_exception_objects,vcl,\
|
||||
vcl/opengl/x11/X11DeviceInfo \
|
||||
))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Runtime dependency for unit-tests
|
||||
$(eval $(call gb_Library_use_restarget,vcl,vcl))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
#include <headless/svpinst.hxx>
|
||||
#include <headless/svpdummies.hxx>
|
||||
#include <generic/gendata.hxx>
|
||||
#include <unx/gendata.hxx>
|
||||
|
||||
class HeadlessSalInstance : public SvpSalInstance
|
||||
{
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
|
||||
#if ENABLE_CAIRO_CANVAS
|
||||
#if defined CAIRO_VERSION && CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
|
||||
# define CAIRO_OPERATOR_DIFFERENCE (static_cast<cairo_operator_t>(23))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@@ -259,15 +259,12 @@ public:
|
||||
long nHeight, sal_uInt8 nTransparency ) override;
|
||||
|
||||
virtual SystemGraphicsData GetGraphicsData() const override;
|
||||
|
||||
#if ENABLE_CAIRO_CANVAS
|
||||
virtual bool SupportsCairo() const override;
|
||||
virtual cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const override;
|
||||
virtual cairo::SurfaceSharedPtr CreateSurface(const OutputDevice& rRefDevice, int x, int y, int width, int height) const override;
|
||||
virtual cairo::SurfaceSharedPtr CreateBitmapSurface(const OutputDevice& rRefDevice, const BitmapSystemData& rData, const Size& rSize) const override;
|
||||
virtual css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const override;
|
||||
virtual SystemFontData GetSysFontData( int nFallbackLevel ) const override;
|
||||
#endif
|
||||
|
||||
bool TryRenderCachedNativeControl(ControlCacheKey& aControlCacheKey,
|
||||
int nX, int nY);
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <tools/stream.hxx>
|
||||
#include <vcl/graphicfilter.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLHelper.hxx>
|
||||
#endif
|
||||
|
||||
#include "BitmapSymmetryCheck.hxx"
|
||||
|
||||
@@ -55,8 +58,10 @@ void BitmapTest::testConvert()
|
||||
//it would be nice to find and change the stride for quartz to be the same as everyone else
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(10), pReadAccess->GetScanlineSize());
|
||||
#else
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if (!OpenGLHelper::isVCLOpenGLEnabled())
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize());
|
||||
#endif
|
||||
#endif
|
||||
CPPUNIT_ASSERT(pReadAccess->HasPalette());
|
||||
const BitmapColor& rColor = pReadAccess->GetPaletteColor(pReadAccess->GetPixelIndex(1, 1));
|
||||
|
||||
@@ -51,7 +51,9 @@
|
||||
#include <vcl/scheduler.hxx>
|
||||
#include <vcl/unohelp.hxx>
|
||||
#include <vcl/lazydelete.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLWrapper.hxx>
|
||||
#endif
|
||||
|
||||
#include "salinst.hxx"
|
||||
#include "salframe.hxx"
|
||||
@@ -1220,9 +1222,11 @@ OUString Application::GetHWOSConfInfo()
|
||||
aDetails.append( "; " );
|
||||
|
||||
aDetails.append( VclResId(SV_APP_UIRENDER).toString() );
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if ( OpenGLWrapper::isVCLOpenGLEnabled() )
|
||||
aDetails.append( VclResId(SV_APP_GL).toString() );
|
||||
else
|
||||
#endif
|
||||
aDetails.append( VclResId(SV_APP_DEFAULT).toString() );
|
||||
aDetails.append( "; " );
|
||||
|
||||
|
||||
@@ -52,7 +52,10 @@
|
||||
|
||||
#include "officecfg/Office/Common.hxx"
|
||||
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
#endif
|
||||
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::lang;
|
||||
@@ -154,10 +157,12 @@ vcl::Window *ImplGetDefaultContextWindow()
|
||||
pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create( nullptr, WB_DEFAULTWIN );
|
||||
pSVData->mpDefaultWin->SetText( "VCL ImplGetDefaultWindow" );
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
// Add a reference to the default context so it never gets deleted
|
||||
rtl::Reference<OpenGLContext> pContext = pSVData->mpDefaultWin->GetGraphics()->GetOpenGLContext();
|
||||
if( pContext.is() )
|
||||
pContext->acquire();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,10 @@
|
||||
#include "salimestatus.hxx"
|
||||
#include "xconnection.hxx"
|
||||
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
#endif
|
||||
|
||||
#include <osl/process.h>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
@@ -110,8 +113,10 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
|
||||
(pInfo->Signal == osl_Signal_DebugBreak) )
|
||||
{
|
||||
nVCLException = EXCEPTION_SYSTEM;
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if (OpenGLZone::isInZone())
|
||||
OpenGLZone::hardDisable();
|
||||
#endif
|
||||
}
|
||||
|
||||
// RC
|
||||
@@ -188,8 +193,9 @@ int ImplSVMain()
|
||||
pSVData->mxAccessBridge.clear();
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
OpenGLWatchdogThread::stop();
|
||||
|
||||
#endif
|
||||
DeInitVCL();
|
||||
|
||||
return nReturn;
|
||||
|
||||
@@ -24,8 +24,10 @@
|
||||
#include <vcl/bitmapex.hxx>
|
||||
#include <vcl/bitmap.hxx>
|
||||
#include <vcl/bitmapscalesuper.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLHelper.hxx>
|
||||
|
||||
#endif
|
||||
#include <memory>
|
||||
|
||||
#include "impbmp.hxx"
|
||||
@@ -1007,7 +1009,11 @@ bool Bitmap::Scale( const Size& rNewSize, BmpScaleFlag nScaleFlag )
|
||||
|
||||
bool Bitmap::HasFastScale()
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
return OpenGLHelper::isVCLOpenGLEnabled();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Bitmap::AdaptBitCount(Bitmap& rNew) const
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include "openglgdiimpl.hxx"
|
||||
#endif
|
||||
#include "salgdi.hxx"
|
||||
#include "salframe.hxx"
|
||||
|
||||
@@ -50,7 +53,7 @@ SalGraphics::SalGraphics()
|
||||
SalGraphics::~SalGraphics()
|
||||
{
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
rtl::Reference<OpenGLContext> SalGraphics::GetOpenGLContext() const
|
||||
{
|
||||
OpenGLSalGraphicsImpl *pImpl = dynamic_cast<OpenGLSalGraphicsImpl*>(GetImpl());
|
||||
@@ -59,6 +62,7 @@ rtl::Reference<OpenGLContext> SalGraphics::GetOpenGLContext() const
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SalGraphics::drawTransformedBitmap(
|
||||
const basegfx::B2DPoint& /* rNull */,
|
||||
|
||||
@@ -22,7 +22,10 @@
|
||||
#include <vcl/bitmap.hxx>
|
||||
#include <vcl/bitmapex.hxx>
|
||||
#include <vcl/bitmapaccess.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLHelper.hxx>
|
||||
#endif
|
||||
#include <vcl/outdev.hxx>
|
||||
#include <vcl/virdev.hxx>
|
||||
#include <vcl/image.hxx>
|
||||
@@ -688,8 +691,10 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
|
||||
}
|
||||
|
||||
// we need to make sure OpenGL never reaches this slow code path
|
||||
assert(!OpenGLHelper::isVCLOpenGLEnabled());
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
assert(!OpenGLHelper::isVCLOpenGLEnabled());
|
||||
#endif
|
||||
Rectangle aBmpRect(Point(), rBmp.GetSizePixel());
|
||||
if (!aBmpRect.Intersection(Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty())
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <window.h>
|
||||
#include <svdata.hxx>
|
||||
#include <salframe.hxx>
|
||||
|
||||
#include <config_features.h>
|
||||
#include <com/sun/star/awt/MouseEvent.hpp>
|
||||
#include <com/sun/star/awt/KeyModifier.hpp>
|
||||
#include <com/sun/star/awt/MouseButton.hpp>
|
||||
@@ -492,11 +492,14 @@ void Window::ImplCallResize()
|
||||
// OpenGL has a charming feature of black clearing the whole window
|
||||
// some legacy code eg. the app-menu has the beautiful feature of
|
||||
// avoiding re-paints when width doesn't change => invalidate all.
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if( OpenGLWrapper::isVCLOpenGLEnabled() )
|
||||
Invalidate();
|
||||
|
||||
// Normally we avoid blanking on re-size unless people might notice:
|
||||
else if( GetBackground().IsGradient() )
|
||||
else
|
||||
#endif
|
||||
if( GetBackground().IsGradient() )
|
||||
Invalidate();
|
||||
|
||||
Resize();
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
#include <salframe.hxx>
|
||||
#include <svdata.hxx>
|
||||
#include <comphelper/lok.hxx>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLHelper.hxx>
|
||||
#endif
|
||||
|
||||
#define IMPL_PAINT_PAINT ((sal_uInt16)0x0001)
|
||||
#define IMPL_PAINT_PAINTALL ((sal_uInt16)0x0002)
|
||||
@@ -273,11 +275,12 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
|
||||
pWindowImpl->mnPaintFlags = 0;
|
||||
if (!pWindowImpl->maInvalidateRegion.IsEmpty())
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
VCL_GL_INFO("PaintHelper::DoPaint on " <<
|
||||
typeid( *m_pWindow ).name() << " '" << m_pWindow->GetText() << "' begin");
|
||||
|
||||
OutputDevice::PaintScope aScope( m_pWindow );
|
||||
|
||||
#endif
|
||||
// double-buffering: setup the buffer if it does not exist
|
||||
if (!pFrameData->mbInBufferedPaint && m_pWindow->SupportsDoubleBuffering())
|
||||
StartBufferedPaint();
|
||||
@@ -305,9 +308,10 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
|
||||
m_pWindow->PushPaintHelper(this, *m_pWindow);
|
||||
m_pWindow->Paint(*m_pWindow, m_aPaintRect);
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
VCL_GL_INFO("PaintHelper::DoPaint end on " <<
|
||||
typeid( *m_pWindow ).name() << " '" << m_pWindow->GetText() << "'");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,7 +629,9 @@ void Window::ImplCallOverlapPaint()
|
||||
{
|
||||
// - RTL - notify ImplCallPaint to check for re-mirroring (CHECKRTL)
|
||||
// because we were called from the Sal layer
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
OutputDevice::PaintScope aScope( GetOutDev() );
|
||||
#endif
|
||||
ImplCallPaint(nullptr, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
|
||||
}
|
||||
}
|
||||
@@ -645,7 +651,9 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void)
|
||||
return;
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
OutputDevice::PaintScope aScope(this);
|
||||
#endif
|
||||
|
||||
// save paint events until resizing or initial sizing done
|
||||
if (mpWindowImpl->mbFrame &&
|
||||
@@ -664,8 +672,9 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
|
||||
{
|
||||
if( mpWindowImpl->mbReallyVisible )
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
OutputDevice::PaintScope aScope(this);
|
||||
|
||||
#endif
|
||||
ImplCallResize();
|
||||
if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
|
||||
{
|
||||
|
||||
@@ -27,8 +27,10 @@
|
||||
#include <vcl/status.hxx>
|
||||
#include <vcl/virdev.hxx>
|
||||
#include <vcl/settings.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLWrapper.hxx>
|
||||
|
||||
#endif
|
||||
#include <svdata.hxx>
|
||||
#include <window.h>
|
||||
|
||||
@@ -711,8 +713,10 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
|
||||
|
||||
// tdf#94213 - un-necessary virtual-device in GL mode
|
||||
// causes context switch & hence flicker during sizing.
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if( OpenGLWrapper::isVCLOpenGLEnabled() )
|
||||
bOffscreen = false;
|
||||
#endif
|
||||
|
||||
if (!bOffscreen)
|
||||
rRenderContext.Erase(rRect);
|
||||
|
||||
@@ -29,8 +29,10 @@
|
||||
|
||||
#include <osl/module.hxx>
|
||||
#include <comphelper/solarmutex.hxx>
|
||||
#include <config_features.h>
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include <vcl/opengl/OpenGLContext.hxx>
|
||||
|
||||
#endif
|
||||
#include "unx/geninst.h"
|
||||
|
||||
// SalYieldMutex
|
||||
@@ -60,7 +62,9 @@ void SalYieldMutex::release()
|
||||
assert(mnThreadId == osl::Thread::getCurrentIdentifier());
|
||||
if ( mnCount == 1 )
|
||||
{
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
OpenGLContext::prepareForYield();
|
||||
#endif
|
||||
mnThreadId = 0;
|
||||
}
|
||||
mnCount--;
|
||||
|
||||
@@ -45,13 +45,14 @@
|
||||
#include <opengl/zone.hxx>
|
||||
|
||||
// internal headers for OpenGLTests class.
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
#include "salgdi.hxx"
|
||||
#include "salframe.hxx"
|
||||
#include "openglgdiimpl.hxx"
|
||||
#include "opengl/texture.hxx"
|
||||
#include "opengl/framebuffer.hxx"
|
||||
#include <vcl/opengl/OpenGLHelper.hxx>
|
||||
|
||||
#endif
|
||||
#include <rtl/math.hxx>
|
||||
|
||||
#define FIXME_SELF_INTERSECTING_WORKING 0
|
||||
@@ -2234,13 +2235,15 @@ public:
|
||||
VclPtr<DemoPopup> xPopup;
|
||||
|
||||
aMainWin->SetText("Interactive VCL demo #1");
|
||||
|
||||
#if HAVE_FEATURE_OPENGL
|
||||
if (bGLTest)
|
||||
{
|
||||
OpenGLTests aTests;
|
||||
return aTests.execute();
|
||||
}
|
||||
else if (bWidgets)
|
||||
else
|
||||
#endif
|
||||
if (bWidgets)
|
||||
xWidgets = VclPtr< DemoWidgets >::Create ();
|
||||
else if (bPopup)
|
||||
xPopup = VclPtrInstance< DemoPopup> ();
|
||||
|
||||
Reference in New Issue
Block a user