OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkLua.h" | 8 #include "SkLua.h" |
9 | 9 |
10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1201 |
1202 /////////////////////////////////////////////////////////////////////////////// | 1202 /////////////////////////////////////////////////////////////////////////////// |
1203 | 1203 |
1204 static const char* rrect_type(const SkRRect& rr) { | 1204 static const char* rrect_type(const SkRRect& rr) { |
1205 switch (rr.getType()) { | 1205 switch (rr.getType()) { |
1206 case SkRRect::kUnknown_Type: return "unknown"; | 1206 case SkRRect::kUnknown_Type: return "unknown"; |
1207 case SkRRect::kEmpty_Type: return "empty"; | 1207 case SkRRect::kEmpty_Type: return "empty"; |
1208 case SkRRect::kRect_Type: return "rect"; | 1208 case SkRRect::kRect_Type: return "rect"; |
1209 case SkRRect::kOval_Type: return "oval"; | 1209 case SkRRect::kOval_Type: return "oval"; |
1210 case SkRRect::kSimple_Type: return "simple"; | 1210 case SkRRect::kSimple_Type: return "simple"; |
| 1211 case SkRRect::kNinePatch_Type: return "nine-patch"; |
1211 case SkRRect::kComplex_Type: return "complex"; | 1212 case SkRRect::kComplex_Type: return "complex"; |
1212 } | 1213 } |
1213 SkDEBUGFAIL("never get here"); | 1214 SkDEBUGFAIL("never get here"); |
1214 return ""; | 1215 return ""; |
1215 } | 1216 } |
1216 | 1217 |
1217 static int lrrect_rect(lua_State* L) { | 1218 static int lrrect_rect(lua_State* L) { |
1218 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect()); | 1219 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect()); |
1219 return 1; | 1220 return 1; |
1220 } | 1221 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 REG_CLASS(L, SkShader); | 1425 REG_CLASS(L, SkShader); |
1425 REG_CLASS(L, SkTypeface); | 1426 REG_CLASS(L, SkTypeface); |
1426 REG_CLASS(L, SkMatrix); | 1427 REG_CLASS(L, SkMatrix); |
1427 } | 1428 } |
1428 | 1429 |
1429 extern "C" int luaopen_skia(lua_State* L); | 1430 extern "C" int luaopen_skia(lua_State* L); |
1430 extern "C" int luaopen_skia(lua_State* L) { | 1431 extern "C" int luaopen_skia(lua_State* L) { |
1431 SkLua::Load(L); | 1432 SkLua::Load(L); |
1432 return 0; | 1433 return 0; |
1433 } | 1434 } |
OLD | NEW |