Skip to content
This repository was archived by the owner on Jun 8, 2020. It is now read-only.

Merge our separate Skia crates. #86

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "skia-c"]
path = skia-c
url = https://github.com/DiamondLovesYou/skia-c.git
48 changes: 19 additions & 29 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]

name = "servo-skia"
version = "0.20130412.3"
name = "skia-sys"
version = "0.20130412.4"
authors = ["The Skia Project Developers and The Servo Project Developers"]
description = "2D graphic library for drawing Text, Geometries, and Images"
description = "2D graphic library for drawing Text, Geometries, and Images. FFI bindings only."
license = "BSD-3-Clause"
repository ="https://github.com/servo/skia/"
homepage = "https://skia.org/"
Expand All @@ -18,48 +18,38 @@ exclude = [
]

[lib]
name = "skia"
name = "skia_sys"

[dependencies]
euclid = "0.4"
gleam = "0.2"
libc = "0.2"
servo-glutin = "0.4"
expat-sys = "2.1.0"

[target.i686-unknown-linux-gnu.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
x11 = { version = "2.0.0", features = ["xlib"] }
glx = "0.1.0"

[target.x86_64-unknown-linux-gnu.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
x11 = { version = "2.0.0", features = ["xlib"] }
glx = "0.1.0"

[target.arm-unknown-linux-gnueabihf.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
x11 = { version = "2.0.0", features = ["xlib"] }
glx = "0.1.0"

[target.aarch64-unknown-linux-gnu.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
x11 = { version = "2.0.0", features = ["xlib"] }
glx = "0.1.0"

[target.arm-linux-androideabi.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
[target.aarch64-linux-android.dependencies]
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
[target.i686-linux-android.dependencies]
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
[target.x86_64-linux-android.dependencies]
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"
servo-egl = "0.2"

[target.x86_64-pc-windows-gnu.dependencies]
servo-fontconfig = "0.2"
servo-fontconfig-sys = "2.11"
servo-freetype-sys = "2.4.11"

[target.x86_64-apple-darwin.dependencies]
cgl = "0.1"
io-surface = "0.1.0"
17 changes: 9 additions & 8 deletions makefile.cargo
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ endif
CXXFLAGS += \
-DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0 \
-DGR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1 \
-I"$(DEP_FONTCONFIG_INCDIR)" \
-I"$(DEP_FREETYPE_OUTDIR)/include" \
-I"$(DEP_EXPAT_OUTDIR)/include" \
-Iinclude/config \
Expand All @@ -55,8 +56,7 @@ CXXFLAGS += \
-Isrc/utils \
-Ithird_party/etc1 \
-Ithird_party/ktx \
-iquote src/gpu \
-I/usr/include/freetype2
-iquote src/gpu

USE_CLANG = $(shell $(CXX) --version|grep -c 'clang')
ifeq ($(USE_CLANG),1)
Expand Down Expand Up @@ -557,7 +557,7 @@ SKIA_UTILS_CXX_SRC += \
)
endif

ifeq (androideabi,$(findstring androideabi,$(TARGET)))
ifeq (android,$(findstring android,$(TARGET)))
CXXFLAGS += \
-DSK_BUILD_FOR_ANDROID \
-DEGL_EGLEXT_PROTOTYPES \
Expand Down Expand Up @@ -687,6 +687,7 @@ endif

SKIA_SRC = \
src/skia-c.cpp \
skia-c/src/skia.cpp \
$(SKIA_CORE_CXX_SRC) \
$(SKIA_EFFECTS_CXX_SRC) \
$(SKIA_FONTS_CXX_SRC) \
Expand Down Expand Up @@ -764,19 +765,19 @@ $(OUT_DIR)/%opts_check_x86.o: %opts_check_x86.cpp $(OUT_DIR)/src/ports/SkAtomics
# those extensions for all processors. We only enable those extensions when compiling
# that file. Skia will not call the code if it does not detect SSE3 support
# at runtime.
$(OUT_DIR)/%SSE3.o: %SSE3.cpp $(OUT_DIR)/src/ports/SkAtomics_sync.h
$(OUT_DIR)/%SSE3.o: %SSE3.cpp $(OUT_DIR)/src/ports/SkAtomics_sync.h makefile.cargo
mkdir -p `dirname $@` && $(CXX) -c $(CXXFLAGS) $(PROCESSOR_EXTENSION_CXXFLAGS) -mssse3 -o $@ $<

$(OUT_DIR)/%.o: %.cpp $(OUT_DIR)/src/ports/SkAtomics_sync.h
$(OUT_DIR)/%.o: %.cpp $(OUT_DIR)/src/ports/SkAtomics_sync.h makefile.cargo
mkdir -p `dirname $@` && $(CXX) -c $(CXXFLAGS) $(PROCESSOR_EXTENSION_CXXFLAGS) -o $@ $<

$(OUT_DIR)/%.o: %.c $(OUT_DIR)/src/ports/SkAtomics_sync.h
$(OUT_DIR)/%.o: %.c $(OUT_DIR)/src/ports/SkAtomics_sync.h makefile.cargo
mkdir -p `dirname $@` && $(CC) -c $(CXXFLAGS) $(PROCESSOR_EXTENSION_CXXFLAGS) -o $@ $<

$(OUT_DIR)/%.o: %.S $(OUT_DIR)/src/ports/SkAtomics_sync.h
$(OUT_DIR)/%.o: %.S $(OUT_DIR)/src/ports/SkAtomics_sync.h makefile.cargo
mkdir -p `dirname $@` && $(CXX) -c $(CXXFLAGS) $(PROCESSOR_EXTENSION_CXXFLAGS) -o $@ $<

$(OUT_DIR)/libskia.a: $(SKIA_OBJS) src/skia-c.h
$(OUT_DIR)/libskia.a: $(SKIA_OBJS) src/skia-c.h makefile.cargo
cp -R include $(OUT_DIR)
cp src/skia-c.h $(OUT_DIR)/include
cd $(OUT_DIR) && $(AR) rcs $(subst $(OUT_DIR)/,,$@) $(subst $(OUT_DIR)/,,$(SKIA_OBJS))
1 change: 1 addition & 0 deletions skia-c
Submodule skia-c added at 911d8d
103 changes: 0 additions & 103 deletions src/gl_context.rs

This file was deleted.

93 changes: 0 additions & 93 deletions src/gl_context_android.rs

This file was deleted.

Loading