Index: src/utils/SkLua.cpp |
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp |
index 9e9477596a1fd402c7e5469438ca3ff10bc5fa6f..773af54dfd6301119bb744691e07bd1dd10499e3 100644 |
--- a/src/utils/SkLua.cpp |
+++ b/src/utils/SkLua.cpp |
@@ -21,6 +21,7 @@ |
#include "SkPixelRef.h" |
#include "SkRRect.h" |
#include "SkString.h" |
+#include "SkTextBlob.h" |
#include "SkTypeface.h" |
extern "C" { |
@@ -45,6 +46,7 @@ DEF_MTNAME(SkPath) |
DEF_MTNAME(SkPaint) |
DEF_MTNAME(SkPathEffect) |
DEF_MTNAME(SkShader) |
+DEF_MTNAME(SkTextBlob) |
DEF_MTNAME(SkTypeface) |
template <typename T> T* push_new(lua_State* L) { |
@@ -273,6 +275,11 @@ void SkLua::pushCanvas(SkCanvas* canvas, const char key[]) { |
CHECK_SETFIELD(key); |
} |
+void SkLua::pushTextBlob(const SkTextBlob* blob, const char key[]) { |
+ push_ref(fL, const_cast<SkTextBlob*>(blob)); |
+ CHECK_SETFIELD(key); |
+} |
+ |
static const char* element_type(SkClipStack::Element::Type type) { |
switch (type) { |
case SkClipStack::Element::kEmpty_Type: |