MCPcopy Create free account
hub / github.com/GNOME/gjs / flush_func

Function flush_func

modules/cairo-surface.cpp:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65GJS_JSAPI_RETURN_CONVENTION
66bool flush_func(JSContext* cx, unsigned argc, JS::Value* vp) {
67 GJS_GET_THIS(cx, argc, vp, argv, obj);
68
69 if (argc > 1) {
70 gjs_throw(cx, "Surface.flush() takes no arguments");
71 return false;
72 }
73
74 cairo_surface_t* surface = CairoSurface::for_js(cx, obj);
75 if (!surface)
76 return false;
77
78 cairo_surface_flush(surface);
79
80 if (!gjs_cairo_check_status(cx, cairo_surface_status(surface), "surface"))
81 return false;
82
83 argv.rval().setUndefined();
84 return true;
85}
86
87GJS_JSAPI_RETURN_CONVENTION
88bool finish_func(JSContext* cx, unsigned argc, JS::Value* vp) {

Callers

nothing calls this directly

Calls 2

gjs_throwFunction · 0.85
gjs_cairo_check_statusFunction · 0.85

Tested by

no test coverage detected