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

Side by Side Diff: tools/lua/scrape.lua

Issue 1073473002: change isNestedRect to isNestedFillRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix lua Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « tests/StrokeTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function tostr(t) 1 function tostr(t)
2 local str = "" 2 local str = ""
3 for k, v in next, t do 3 for k, v in next, t do
4 if #str > 0 then 4 if #str > 0 then
5 str = str .. ", " 5 str = str .. ", "
6 end 6 end
7 if type(k) == "number" then 7 if type(k) == "number" then
8 str = str .. "[" .. k .. "] = " 8 str = str .. "[" .. k .. "] = "
9 else 9 else
10 str = str .. tostring(k) .. " = " 10 str = str .. tostring(k) .. " = "
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 total[t.verb] = n + 1 52 total[t.verb] = n + 1
53 53
54 if false and t.verb == "drawRect" and t.paint:isAntiAlias() then 54 if false and t.verb == "drawRect" and t.paint:isAntiAlias() then
55 local r = t.rect; 55 local r = t.rect;
56 local p = t.paint; 56 local p = t.paint;
57 local c = p:getColor(); 57 local c = p:getColor();
58 print("drawRect ", tostr(r), tostr(c), "\n") 58 print("drawRect ", tostr(r), tostr(c), "\n")
59 end 59 end
60 60
61 if false and t.verb == "drawPath" then 61 if false and t.verb == "drawPath" then
62 local pred, r1, r2, d1, d2 = t.path:isNestedRects() 62 local pred, r1, r2, d1, d2 = t.path:isNestedFillRects()
63 63
64 if pred then 64 if pred then
65 print("drawRect_Nested", tostr(r1), tostr(r2), d1, d2) 65 print("drawRect_Nested", tostr(r1), tostr(r2), d1, d2)
66 else 66 else
67 print("drawPath", "isEmpty", tostring(t.path:isEmpty()), 67 print("drawPath", "isEmpty", tostring(t.path:isEmpty()),
68 "isRect", tostring(t.path:isRect()), tostr(t.path:getBounds( ))) 68 "isRect", tostring(t.path:isRect()), tostr(t.path:getBounds( )))
69 end 69 end
70 end 70 end
71 end 71 end
72 72
73 --[[ 73 --[[
74 lua_pictures will call this function after all of the pictures have been 74 lua_pictures will call this function after all of the pictures have been
75 "accumulated". 75 "accumulated".
76 ]] 76 ]]
77 function sk_scrape_summarize() 77 function sk_scrape_summarize()
78 io.write("\n{ ", tostr(total), " }\n") 78 io.write("\n{ ", tostr(total), " }\n")
79 end 79 end
80 80
OLDNEW
« no previous file with comments | « tests/StrokeTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698