add dumpops.lua as a sample scraper that just dumps the arguments
add SkLua.h for common utilities
BUG=
R=rmistry@google.com
Review URL: https://codereview.chromium.org/15737010
git-svn-id: http://skia.googlecode.com/svn/trunk@9242 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/lua/scrape.lua b/tools/lua/scrape.lua
index 9263612..6270188 100644
--- a/tools/lua/scrape.lua
+++ b/tools/lua/scrape.lua
@@ -1,4 +1,3 @@
--- just a helper function to dump the parameters, for debugging
function tostr(t)
local str = ""
for k, v in next, t do
@@ -52,9 +51,11 @@
local n = total[t.verb] or 0
total[t.verb] = n + 1
- if false and t.verb == "drawRect" then
- local m = canvas:getTotalMatrix()
- print("... ", tostr(m), "\n")
+ if false and t.verb == "drawRect" and t.paint:isAntiAlias() then
+ local r = t.rect;
+ local p = t.paint;
+ local c = p:getColor();
+ print("drawRect ", tostr(r), tostr(c), "\n")
end
if false and t.verb == "drawPath" then
@@ -67,15 +68,6 @@
"isRect", tostring(t.path:isRect()), tostr(t.path:getBounds()))
end
end
-
- -- enable to dump all of the parameters we were sent
- if false then
- -- 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
end
--[[