Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: experimental/go-skia/skia.go

Issue 670303005: Compiling Go against C interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed typo Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/c/sk_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/go-skia/skia.go
diff --git a/experimental/go-skia/skia.go b/experimental/go-skia/skia.go
new file mode 100644
index 0000000000000000000000000000000000000000..0758c432d1dd5f0af0c1ffeeccf14c3111b6f4dc
--- /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.
« no previous file with comments | « no previous file | include/c/sk_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698