aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar stephana <stephana@google.com>2014-10-31 07:11:19 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-31 07:11:19 -0700
commit0b5fc9774f6cf155ba4ff1a8e4e3e753206ad969 (patch)
tree54c67bc4040b51fdeff321d3421bd1a9e7ffabf5 /experimental
parent38406c82b913350e55fa04af8c1941cd9b4aff52 (diff)
Quick and dirty test to call the C interface from GO.
Diffstat (limited to 'experimental')
-rw-r--r--experimental/go-skia/skia.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/experimental/go-skia/skia.go b/experimental/go-skia/skia.go
new file mode 100644
index 0000000000..0758c432d1
--- /dev/null
+++ b/experimental/go-skia/skia.go
@@ -0,0 +1,30 @@
+package skia
+
+/*
+#cgo CFLAGS: -I../../include/c
+#cgo LDFLAGS: -L ../../out/Debug/
+#cgo LDFLAGS: -lskia_core
+#cgo LDFLAGS: -lskia_effects
+#cgo LDFLAGS: -lskia_images
+#cgo LDFLAGS: -lskia_opts
+#cgo LDFLAGS: -lskia_ports
+#cgo LDFLAGS: -lskia_sfnt
+#cgo LDFLAGS: -lskia_utils
+#cgo LDFLAGS: -lskia_opts_ssse3
+#cgo LDFLAGS: -lskia_opts_sse4
+#cgo LDFLAGS: -lm
+#cgo LDFLAGS: -lstdc++
+#cgo LDFLAGS: -lGL
+#cgo LDFLAGS: -lGLU
+#include "sk_surface.h"
+*/
+import "C"
+
+func dummyFunction() {
+ testPaint := C.sk_paint_new()
+ defer func() {
+ sk_paint_delete(testPaint)
+ }()
+}
+
+// TODO: replace this with an idiomatic interface to Skia.