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

Side by Side Diff: tools/lua/xfer-counter.lua

Issue 1614923002: Add Lua SkXfermode skp scraping support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use SkFlattenable::getTypeName Created 4 years, 11 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 | « src/utils/SkLua.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
(Empty)
1
2 function sk_scrape_startcanvas(c, fileName)
3 end
4
5 function sk_scrape_endcanvas(c, fileName)
6 end
7
8 local gXM_Count = 0
9 local gXferModeTab = {}
10
11 function sk_scrape_accumulate(t)
12 if not t.paint then
13 return
14 end
15
16 local xferMode = t.paint:getXfermode()
17
18 if xferMode then
19 local modeName = xferMode:getTypeName()
20
21 if gXferModeTab[modeName] == nil then
22 gXferModeTab[modeName] = 1;
23 else
24 gXferModeTab[modeName] = gXferModeTab[modeName] + 1
25 end
26 gXM_Count = gXM_Count + 1
27 end
28 end
29
30 function sk_scrape_summarize()
31 for key,value in pairs(gXferModeTab) do
32 io.write(key, ": ", value, "\n")
33 end
34 io.write("total: ", gXM_Count)
35 end
36
37 function test_summary()
38 io.write("just testing test_summary\n")
39 end
40
OLDNEW
« no previous file with comments | « src/utils/SkLua.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698