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

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

Issue 698943002: patch from issue 697743002 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment Created 6 years, 1 month 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 | no next file » | 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
index 0758c432d1dd5f0af0c1ffeeccf14c3111b6f4dc..30730578a7ac36edbd989be8535b390b11c2449c 100644
--- a/experimental/go-skia/skia.go
+++ b/experimental/go-skia/skia.go
@@ -1,30 +1,38 @@
-package skia
+package main
+
+// First, build Skia this way:
+// ./gyp_skia -Dskia_shared_lib=1 && ninja -C out/Debug
/*
-#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
+#cgo LDFLAGS: -lX11
+#cgo LDFLAGS: -ldl
+#cgo LDFLAGS: -lfontconfig
+#cgo LDFLAGS: -lfreetype
+#cgo LDFLAGS: -lgif
+#cgo LDFLAGS: -lm
+#cgo LDFLAGS: -lpng
+#cgo LDFLAGS: -lstdc++
+#cgo LDFLAGS: -lz
+
+#cgo LDFLAGS: -L ../../out/Debug/lib
+#cgo LDFLAGS: -Wl,-rpath=../../out/Debug/lib
+#cgo LDFLAGS: -lskia
+
+#cgo CFLAGS: -I../../include/c
#include "sk_surface.h"
*/
import "C"
-func dummyFunction() {
- testPaint := C.sk_paint_new()
- defer func() {
- sk_paint_delete(testPaint)
- }()
+import (
+ "fmt"
+)
+
+func main() {
+ p := C.sk_paint_new()
+ defer C.sk_paint_delete(p)
+ fmt.Println("OK!")
}
// TODO: replace this with an idiomatic interface to Skia.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698