| 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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 SkColorFilter* cf = paint->getColorFilter(); | 1107 SkColorFilter* cf = paint->getColorFilter(); |
| 1108 if (cf) { | 1108 if (cf) { |
| 1109 push_ref(L, cf); | 1109 push_ref(L, cf); |
| 1110 return 1; | 1110 return 1; |
| 1111 } | 1111 } |
| 1112 return 0; | 1112 return 0; |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 static int lpaint_setColorFilter(lua_State* L) { | 1115 static int lpaint_setColorFilter(lua_State* L) { |
| 1116 SkPaint* paint = get_obj<SkPaint>(L, 1); | 1116 SkPaint* paint = get_obj<SkPaint>(L, 1); |
| 1117 paint->setColorFilter(sk_ref_sp(get_ref<SkColorFilter>(L, 2))); | 1117 paint->setColorFilter(get_ref<SkColorFilter>(L, 2)); |
| 1118 return 0; | 1118 return 0; |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 static int lpaint_getImageFilter(lua_State* L) { | 1121 static int lpaint_getImageFilter(lua_State* L) { |
| 1122 const SkPaint* paint = get_obj<SkPaint>(L, 1); | 1122 const SkPaint* paint = get_obj<SkPaint>(L, 1); |
| 1123 SkImageFilter* imf = paint->getImageFilter(); | 1123 SkImageFilter* imf = paint->getImageFilter(); |
| 1124 if (imf) { | 1124 if (imf) { |
| 1125 push_ref(L, imf); | 1125 push_ref(L, imf); |
| 1126 return 1; | 1126 return 1; |
| 1127 } | 1127 } |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 REG_CLASS(L, SkTextBlob); | 2136 REG_CLASS(L, SkTextBlob); |
| 2137 REG_CLASS(L, SkTypeface); | 2137 REG_CLASS(L, SkTypeface); |
| 2138 REG_CLASS(L, SkXfermode); | 2138 REG_CLASS(L, SkXfermode); |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 extern "C" int luaopen_skia(lua_State* L); | 2141 extern "C" int luaopen_skia(lua_State* L); |
| 2142 extern "C" int luaopen_skia(lua_State* L) { | 2142 extern "C" int luaopen_skia(lua_State* L) { |
| 2143 SkLua::Load(L); | 2143 SkLua::Load(L); |
| 2144 return 0; | 2144 return 0; |
| 2145 } | 2145 } |
| OLD | NEW |