Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/lua/scrape.lua

Issue 15737010: add dumpops.lua as a sample scraper that just dumps the arguments (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/lua/dumpops.lua ('k') | tools/lua/skia.lua » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/scrape.lua
diff --git a/tools/lua/scrape.lua b/tools/lua/scrape.lua
index 92636121da7405514b9187890d33b4ef00526d07..627018800acb2839f2b6be47dc63c4a1e2391bc7 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 @@ function sk_scrape_accumulate(t)
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 @@ function sk_scrape_accumulate(t)
"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
--[[
« no previous file with comments | « tools/lua/dumpops.lua ('k') | tools/lua/skia.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698