summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/tools/lua/dumpops.lua
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/tools/lua/dumpops.lua')
-rw-r--r--chromium/third_party/skia/tools/lua/dumpops.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/chromium/third_party/skia/tools/lua/dumpops.lua b/chromium/third_party/skia/tools/lua/dumpops.lua
new file mode 100644
index 00000000000..1667e579fa9
--- /dev/null
+++ b/chromium/third_party/skia/tools/lua/dumpops.lua
@@ -0,0 +1,34 @@
+function tostr(t)
+ local str = ""
+ for k, v in next, t do
+ if #str > 0 then
+ str = str .. ", "
+ end
+ if type(k) == "number" then
+ str = str .. "[" .. k .. "] = "
+ else
+ str = str .. tostring(k) .. " = "
+ end
+ if type(v) == "table" then
+ str = str .. "{ " .. tostr(v) .. " }"
+ else
+ str = str .. tostring(v)
+ end
+ end
+ return str
+end
+
+function sk_scrape_startcanvas(c, fileName) end
+
+function sk_scrape_endcanvas(c, fileName) end
+
+function sk_scrape_accumulate(t)
+ -- dump the params in t, specifically showing the verb first, which we
+ -- then nil out so it doesn't appear in tostr()
+ io.write(t.verb, " ")
+ t.verb = nil
+ io.write(tostr(t), "\n")
+end
+
+function sk_scrape_summarize() end
+