Lines Matching refs:fL
123 fL = luaL_newstate(); in SkLua()
124 luaL_openlibs(fL); in SkLua()
125 SkLua::Load(fL); in SkLua()
128 SkLua::SkLua(lua_State* L) : fL(L), fWeOwnL(false) {} in SkLua()
133 lua_getglobal(fL, fTermCode.c_str()); in ~SkLua()
134 if (lua_pcall(fL, 0, 0, 0) != LUA_OK) { in ~SkLua()
135 SkDebugf("lua err: %s\n", lua_tostring(fL, -1)); in ~SkLua()
138 lua_close(fL); in ~SkLua()
143 int err = luaL_loadstring(fL, code) || lua_pcall(fL, 0, 0, 0); in runCode()
145 SkDebugf("--- lua failed: %s\n", lua_tostring(fL, -1)); in runCode()
158 #define CHECK_SETFIELD(key) do if (key) lua_setfield(fL, -2, key); while (0)
247 lua_pushboolean(fL, value); in pushBool()
252 lua_pushstring(fL, str); in pushString()
259 lua_pushstring(fL, s.c_str()); in pushString()
264 lua_pushstring(fL, str.c_str()); in pushString()
269 lua_newtable(fL); in pushColor()
270 setfield_number(fL, "a", SkColorGetA(color) / 255.0); in pushColor()
271 setfield_number(fL, "r", SkColorGetR(color) / 255.0); in pushColor()
272 setfield_number(fL, "g", SkColorGetG(color) / 255.0); in pushColor()
273 setfield_number(fL, "b", SkColorGetB(color) / 255.0); in pushColor()
278 lua_pushnumber(fL, (double)value); in pushU32()
283 lua_pushnumber(fL, SkScalarToLua(value)); in pushScalar()
288 lua_newtable(fL); in pushArrayU16()
291 setarray_number(fL, i + 1, (double)array[i]); in pushArrayU16()
297 lua_newtable(fL); in pushArrayPoint()
300 lua_newtable(fL); in pushArrayPoint()
303 lua_rawseti(fL, -2, i + 1); in pushArrayPoint()
309 lua_newtable(fL); in pushArrayScalar()
312 setarray_scalar(fL, i + 1, array[i]); in pushArrayScalar()
318 lua_newtable(fL); in pushRect()
319 setfield_scalar(fL, "left", r.fLeft); in pushRect()
320 setfield_scalar(fL, "top", r.fTop); in pushRect()
321 setfield_scalar(fL, "right", r.fRight); in pushRect()
322 setfield_scalar(fL, "bottom", r.fBottom); in pushRect()
327 push_obj(fL, rr); in pushRRect()
332 lua_newtable(fL); in pushDash()
333 setfield_scalar(fL, "phase", info.fPhase); in pushDash()
340 push_obj(fL, matrix); in pushMatrix()
345 push_obj(fL, paint); in pushPaint()
350 push_obj(fL, path); in pushPath()
355 push_ptr(fL, canvas); in pushCanvas()
360 push_ref(fL, const_cast<SkTextBlob*>(blob)); in pushTextBlob()
1739 AutoCallLua(lua_State* L, const char func[], const char verb[]) : fL(L) { in AutoCallLua()
1751 if (lua_pcall(fL, 1, 0, 0) != LUA_OK) { in ~AutoCallLua()
1752 SkDebugf("lua err: %s\n", lua_tostring(fL, -1)); in ~AutoCallLua()
1754 lua_settop(fL, -1); in ~AutoCallLua()
1758 lua_State* fL; member in AutoCallLua
1761 #define AUTO_LUA(verb) AutoCallLua acl(fL, fFunc.c_str(), verb)