Quick and dirty test to call the C interface from GO.
BUG=skia: Review URL: https://codereview.chromium.org/670303005
This commit is contained in:
parent
38406c82b9
commit
0b5fc9774f
30
experimental/go-skia/skia.go
Normal file
30
experimental/go-skia/skia.go
Normal file
@ -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.
|
@ -14,6 +14,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user