do not build OpenGL support in Skia

We currently do not use it. If somebody wants to add support for that,
you're welcome, but until then there's no point in building this.

Change-Id: Ia714a6babdac1824e6cca3438794a0945e175c14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91746
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Luboš Luňák
2020-04-06 13:05:06 +02:00
parent 5d4cc08cf7
commit 01546c005e
5 changed files with 50 additions and 69 deletions

View File

@@ -29,15 +29,13 @@ are the same.
#define SK_SUPPORT_GPU 1
#define SK_GL 1
#define SK_VULKAN 1
#define SK_CODEC_DECODES_PNG 1
#define SK_ENCODE_PNG 1
// These are just to avoid warnings (some headers use them even with GL disabled).
#define SK_ASSUME_GL 1
#define SK_ASSUME_GL_ES 0

View File

@@ -39,7 +39,6 @@ $(eval $(call gb_Library_use_system_win32_libs,skia,\
oleaut32 \
user32 \
usp10 \
opengl32 \
gdi32 \
))
else
@@ -60,7 +59,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,skia,\
-lm \
-ldl \
-lGL \
-lX11-xcb \
-lX11 \
))
@@ -530,36 +528,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/geometry/GrQuad \
UnpackedTarball/skia/src/gpu/geometry/GrQuadUtils \
UnpackedTarball/skia/src/gpu/geometry/GrShape \
UnpackedTarball/skia/src/gpu/gl/builders/GrGLProgramBuilder \
UnpackedTarball/skia/src/gpu/gl/builders/GrGLShaderStringBuilder \
UnpackedTarball/skia/src/gpu/gl/GrGLAssembleGLESInterfaceAutogen \
UnpackedTarball/skia/src/gpu/gl/GrGLAssembleGLInterfaceAutogen \
UnpackedTarball/skia/src/gpu/gl/GrGLAssembleHelpers \
UnpackedTarball/skia/src/gpu/gl/GrGLAssembleInterface \
UnpackedTarball/skia/src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen \
UnpackedTarball/skia/src/gpu/gl/GrGLBuffer \
UnpackedTarball/skia/src/gpu/gl/GrGLCaps \
UnpackedTarball/skia/src/gpu/gl/GrGLContext \
UnpackedTarball/skia/src/gpu/gl/GrGLExtensions \
UnpackedTarball/skia/src/gpu/gl/GrGLGLSL \
UnpackedTarball/skia/src/gpu/gl/GrGLGpu \
UnpackedTarball/skia/src/gpu/gl/GrGLGpuProgramCache \
UnpackedTarball/skia/src/gpu/gl/GrGLInterfaceAutogen \
UnpackedTarball/skia/src/gpu/gl/GrGLPath \
UnpackedTarball/skia/src/gpu/gl/GrGLPathRendering \
UnpackedTarball/skia/src/gpu/gl/GrGLOpsRenderPass \
UnpackedTarball/skia/src/gpu/gl/GrGLProgram \
UnpackedTarball/skia/src/gpu/gl/GrGLProgramDataManager \
UnpackedTarball/skia/src/gpu/gl/GrGLRenderTarget \
UnpackedTarball/skia/src/gpu/gl/GrGLSemaphore \
UnpackedTarball/skia/src/gpu/gl/GrGLStencilAttachment \
UnpackedTarball/skia/src/gpu/gl/GrGLTexture \
UnpackedTarball/skia/src/gpu/gl/GrGLTextureRenderTarget \
UnpackedTarball/skia/src/gpu/gl/GrGLTypesPriv \
UnpackedTarball/skia/src/gpu/gl/GrGLUniformHandler \
UnpackedTarball/skia/src/gpu/gl/GrGLUtil \
UnpackedTarball/skia/src/gpu/gl/GrGLVaryingHandler \
UnpackedTarball/skia/src/gpu/gl/GrGLVertexArray \
UnpackedTarball/skia/src/gpu/glsl/GrGLSLBlend \
UnpackedTarball/skia/src/gpu/glsl/GrGLSL \
UnpackedTarball/skia/src/gpu/glsl/GrGLSLFragmentProcessor \
@@ -797,13 +765,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \
UnpackedTarball/skia/tools/sk_app/GLWindowContext \
UnpackedTarball/skia/tools/sk_app/VulkanWindowContext \
))
ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win \
UnpackedTarball/skia/src/ports/SkDebug_win \
UnpackedTarball/skia/src/ports/SkFontHost_win \
UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \
@@ -819,17 +785,14 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/utils/win/SkDWriteGeometrySink \
UnpackedTarball/skia/src/utils/win/SkHRESULT \
UnpackedTarball/skia/src/utils/win/SkIStream \
UnpackedTarball/skia/src/utils/win/SkWGL_win \
))
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/tools/sk_app/win/GLWindowContext_win \
UnpackedTarball/skia/tools/sk_app/win/RasterWindowContext_win \
UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win \
))
else
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/gl/glx/GrGLMakeNativeInterface_glx \
UnpackedTarball/skia/src/ports/SkDebug_stdio \
UnpackedTarball/skia/src/ports/SkFontConfigInterface \
UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct \
@@ -844,7 +807,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
))
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/tools/sk_app/unix/GLWindowContext_unix \
UnpackedTarball/skia/tools/sk_app/unix/RasterWindowContext_unix \
UnpackedTarball/skia/tools/sk_app/unix/VulkanWindowContext_unix \
))

View File

@@ -31,6 +31,7 @@ skia_patches := \
windows-text-gamma.patch.0 \
windows-force-unicode-api.patch.0 \
operator-eq-bool.patch.0 \
fix-without-gl.patch.0 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))

47
external/skia/fix-without-gl.patch.0 vendored Normal file
View File

@@ -0,0 +1,47 @@
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index 378646ebc1..af3b9ce290 100644
--- ./include/gpu/GrBackendSurface.h
+++ ./include/gpu/GrBackendSurface.h
@@ -74,9 +74,11 @@ public:
GrBackendFormat(const GrBackendFormat&);
GrBackendFormat& operator=(const GrBackendFormat&);
+#ifdef SK_GL
static GrBackendFormat MakeGL(GrGLenum format, GrGLenum target) {
return GrBackendFormat(format, target);
}
+#endif
static GrBackendFormat MakeVk(VkFormat format) {
return GrBackendFormat(format, GrVkYcbcrConversionInfo());
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index 17655bdbed..ce0641f423 100644
--- ./include/gpu/gl/GrGLInterface.h
+++ ./include/gpu/gl/GrGLInterface.h
@@ -65,7 +65,9 @@ public:
GrGLExtensions fExtensions;
+#ifdef SK_GL
bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
+#endif
/**
* The function pointers are in a struct so that we can have a compiler generated assignment
diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h
index 66bfe29331..034cd21838 100644
--- ./src/gpu/gl/GrGLContext.h
+++ ./src/gpu/gl/GrGLContext.h
@@ -45,10 +45,11 @@ public:
GrGLDriverVersion driverVersion() const { return fDriverVersion; }
const GrGLCaps* caps() const { return fGLCaps.get(); }
GrGLCaps* caps() { return fGLCaps.get(); }
+#ifdef SK_GL
bool hasExtension(const char* ext) const {
return fInterface->hasExtension(ext);
}
-
+#endif
const GrGLExtensions& extensions() const { return fInterface->fExtensions; }
protected:

View File

@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2020-04-06 12:31:09 using:
Generated on 2020-04-06 12:59:34 using:
./bin/update_pch external/skia skia --cutoff=1 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -211,10 +211,6 @@
#include <include/gpu/GrContextThreadSafeProxy.h>
#include <include/gpu/GrDriverBugWorkarounds.h>
#include <include/gpu/GrTypes.h>
#include <include/gpu/gl/GrGLAssembleHelpers.h>
#include <include/gpu/gl/GrGLAssembleInterface.h>
#include <include/gpu/gl/GrGLExtensions.h>
#include <include/gpu/gl/GrGLInterface.h>
#include <include/gpu/mock/GrMockTypes.h>
#include <include/gpu/vk/GrVkBackendContext.h>
#include <include/gpu/vk/GrVkExtensions.h>
@@ -223,7 +219,6 @@
#include <include/pathops/SkPathOps.h>
#include <include/ports/SkRemotableFontMgr.h>
#include <include/private/GrContext_Base.h>
#include <include/private/GrGLTypesPriv.h>
#include <include/private/GrImageContext.h>
#include <include/private/GrRecordingContext.h>
#include <include/private/GrResourceKey.h>
@@ -584,7 +579,6 @@
#include <src/gpu/GrSurfaceProxyPriv.h>
#include <src/gpu/GrSurfaceProxyView.h>
#include <src/gpu/GrSwizzle.h>
#include <src/gpu/GrTAllocator.h>
#include <src/gpu/GrTestUtils.h>
#include <src/gpu/GrTexture.h>
#include <src/gpu/GrTextureAdjuster.h>
@@ -677,28 +671,9 @@
#include <src/gpu/geometry/GrQuadUtils.h>
#include <src/gpu/geometry/GrRect.h>
#include <src/gpu/geometry/GrShape.h>
#include <src/gpu/gl/GrGLBuffer.h>
#include <src/gpu/gl/GrGLCaps.h>
#include <src/gpu/gl/GrGLContext.h>
#include <src/gpu/gl/GrGLDefines.h>
#include <src/gpu/gl/GrGLGLSL.h>
#include <src/gpu/gl/GrGLGpu.h>
#include <src/gpu/gl/GrGLOpsRenderPass.h>
#include <src/gpu/gl/GrGLPath.h>
#include <src/gpu/gl/GrGLPathRendering.h>
#include <src/gpu/gl/GrGLProgram.h>
#include <src/gpu/gl/GrGLProgramDataManager.h>
#include <src/gpu/gl/GrGLRenderTarget.h>
#include <src/gpu/gl/GrGLSemaphore.h>
#include <src/gpu/gl/GrGLStencilAttachment.h>
#include <src/gpu/gl/GrGLTexture.h>
#include <src/gpu/gl/GrGLTextureRenderTarget.h>
#include <src/gpu/gl/GrGLUniformHandler.h>
#include <src/gpu/gl/GrGLUtil.h>
#include <src/gpu/gl/GrGLVaryingHandler.h>
#include <src/gpu/gl/GrGLVertexArray.h>
#include <src/gpu/gl/builders/GrGLProgramBuilder.h>
#include <src/gpu/gl/builders/GrGLShaderStringBuilder.h>
#include <src/gpu/glsl/GrGLSL.h>
#include <src/gpu/glsl/GrGLSLBlend.h>
#include <src/gpu/glsl/GrGLSLColorSpaceXformHelper.h>
@@ -925,7 +900,6 @@
#include <src/sksl/ir/SkSLNullLiteral.h>
#include <src/sksl/ir/SkSLPostfixExpression.h>
#include <src/sksl/ir/SkSLPrefixExpression.h>
#include <src/sksl/ir/SkSLProgram.h>
#include <src/sksl/ir/SkSLReturnStatement.h>
#include <src/sksl/ir/SkSLSection.h>
#include <src/sksl/ir/SkSLSetting.h>
@@ -958,7 +932,6 @@
#include <src/utils/SkUTF.h>
#include <tools/gpu/vk/GrVulkanDefines.h>
#include <tools/gpu/vk/VkTestUtils.h>
#include <tools/sk_app/GLWindowContext.h>
#include <tools/sk_app/VulkanWindowContext.h>
#include <vulkan/vulkan_core.h>
#endif // PCH_LEVEL >= 3