summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-07 12:01:04 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-10-10 11:14:03 +0200
commitf15162033e8716d469052d0e1ebcde395baf30c0 (patch)
tree7137f021e6bb0a8fdc9b5846b8c18aed9c8a7513
parent50bdecc398b496fda948568bb97caf78bb5b2112 (diff)
build also the tools/sk_app part of Skia
That's basically code that allows intergrating the library with X11 etc. Change-Id: I3f5506ef4ecc334b4e93c4450fb1aa4c53dbfefc
-rw-r--r--external/skia/Library_skia.mk23
-rw-r--r--external/skia/UnpackedTarball_skia.mk2
-rw-r--r--external/skia/make-api-visible.patch17
3 files changed, 41 insertions, 1 deletions
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 60eb173f9628..bc1af13af801 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -26,6 +26,8 @@ $(eval $(call gb_Library_add_defs,skia,\
-DSK_HAS_JPEG_LIBRARY=1 \
-DSK_HAS_PNG_LIBRARY=1 \
-DSK_GAMMA_APPLY_TO_A8 \
+ -DSK_ASSUME_GL=1 \
+ -DSK_ASSUME_GL_ES=0 \
))
ifneq (,$(gb_ENABLE_DBGUTIL))
@@ -93,6 +95,9 @@ $(eval $(call gb_Library_add_libs,skia,\
-lm \
-ldl \
-lGLX \
+ -lGL \
+ -lX11-xcb \
+ -lX11 \
))
endif
@@ -832,6 +837,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/ports/SkOSFile_stdio \
))
+$(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 \
@@ -853,6 +864,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
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 \
@@ -869,6 +886,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/ports/SkOSLibrary_posix \
UnpackedTarball/skia/src/ports/SkTLS_pthread \
))
+
+$(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 \
+))
endif
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 7ae3bf4427fc..462d07edf8f2 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -12,7 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,skia))
$(eval $(call gb_UnpackedTarball_set_tarball,skia,$(SKIA_TARBALL)))
# TODO
-skia_patches := lerp.patch fix-pch.patch fix-ddi.patch
+skia_patches := lerp.patch fix-pch.patch fix-ddi.patch make-api-visible.patch
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/make-api-visible.patch b/external/skia/make-api-visible.patch
new file mode 100644
index 000000000000..d2c3b1f794e3
--- /dev/null
+++ b/external/skia/make-api-visible.patch
@@ -0,0 +1,17 @@
+--- skia/tools/sk_app/unix/WindowContextFactory_unix.h.sav 2019-09-26 15:02:19.637587019 +0200
++++ skia/tools/sk_app/unix/WindowContextFactory_unix.h 2019-10-07 11:52:46.744194127 +0200
+@@ -33,11 +33,11 @@ struct XlibWindowInfo {
+ int fHeight;
+ };
+
+-WindowContext* NewVulkanForXlib(const XlibWindowInfo&, const DisplayParams&);
++SK_API WindowContext* NewVulkanForXlib(const XlibWindowInfo&, const DisplayParams&);
+
+-WindowContext* NewGLForXlib(const XlibWindowInfo&, const DisplayParams&);
++SK_API WindowContext* NewGLForXlib(const XlibWindowInfo&, const DisplayParams&);
+
+-WindowContext* NewRasterForXlib(const XlibWindowInfo&, const DisplayParams&);
++SK_API WindowContext* NewRasterForXlib(const XlibWindowInfo&, const DisplayParams&);
+
+ } // namespace window_context_factory
+