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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkLua.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/xfer-counter.lua
diff --git a/tools/lua/xfer-counter.lua b/tools/lua/xfer-counter.lua
new file mode 100644
index 0000000000000000000000000000000000000000..c9d659ceb05f097a1548981d96cf1c2a9a6d35bc
--- /dev/null
+++ b/tools/lua/xfer-counter.lua
@@ -0,0 +1,40 @@
+
+function sk_scrape_startcanvas(c, fileName)
+end
+
+function sk_scrape_endcanvas(c, fileName)
+end
+
+local gXM_Count = 0
+local gXferModeTab = {}
+
+function sk_scrape_accumulate(t)
+ if not t.paint then
+ return
+ end
+
+ local xferMode = t.paint:getXfermode()
+
+ if xferMode then
+ local modeName = xferMode:getTypeName()
+
+ if gXferModeTab[modeName] == nil then
+ gXferModeTab[modeName] = 1;
+ else
+ gXferModeTab[modeName] = gXferModeTab[modeName] + 1
+ end
+ gXM_Count = gXM_Count + 1
+ end
+end
+
+function sk_scrape_summarize()
+ for key,value in pairs(gXferModeTab) do
+ io.write(key, ": ", value, "\n")
+ end
+ io.write("total: ", gXM_Count)
+end
+
+function test_summary()
+ io.write("just testing test_summary\n")
+end
+
« 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