aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/lua/paths_agg.lua
diff options
context:
space:
mode:
authorGravatar krajcevski <krajcevski@google.com>2014-08-18 07:52:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-18 07:52:25 -0700
commit0f149e5a78842c920c0ce1e1ac45f54473c11f05 (patch)
tree80b0ebb6ff919ef015519f3892685c6b5fc50f3a /tools/lua/paths_agg.lua
parentb1aded8edd1d809cded20ff546c6e9218b43cda4 (diff)
Add scraper to find paths that fallback to software
R=robertphillips@google.com, krajcevski@gmail.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/475433004
Diffstat (limited to 'tools/lua/paths_agg.lua')
-rw-r--r--tools/lua/paths_agg.lua41
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/lua/paths_agg.lua b/tools/lua/paths_agg.lua
new file mode 100644
index 0000000000..deb212e7d6
--- /dev/null
+++ b/tools/lua/paths_agg.lua
@@ -0,0 +1,41 @@
+
+clips = 0
+draws = 0
+clipPaths = 0
+drawPaths = 0
+swClipPaths = 0
+swDrawPaths = 0
+
+skpsTotal = 0
+skpsWithPath = 0
+skpsWithSWPath = 0
+
+dofile("/tmp/lua-output")
+
+io.write("Number of clips: ", clips, "\n");
+io.write("Number of draws: ", draws, "\n");
+io.write("Number of clipped paths: ", clipPaths, "\n");
+io.write("Number of drawn paths: ", drawPaths, "\n");
+io.write("Number of clipped software paths: ", swClipPaths, "\n");
+io.write("Number of drawn software paths: ", swDrawPaths, "\n");
+
+io.write("\n")
+
+io.write("Number of SKPs total: ", skpsTotal, "\n")
+io.write("Number of SKPs that draw paths: ", skpsWithPath, "\n")
+io.write("Number of SKPs that draw SW paths: ", skpsWithSWPath, "\n")
+
+io.write("\n")
+io.write("\n")
+
+totalSWPaths = swDrawPaths + swClipPaths
+totalPaths = drawPaths + clipPaths
+
+io.write("Percentage of paths needing software: ", (100*(totalSWPaths / totalPaths)), "\n")
+io.write("Percentage of draws/clips needing software: ",
+ (100*(totalSWPaths / (draws + clips))), "\n")
+
+io.write("\n")
+
+io.write("Percentage of SKPs that draw paths: ", (100*(skpsWithPath / skpsTotal)), "\n")
+io.write("Percentage of SKPs that draw SW paths: ", (100*(skpsWithSWPath / skpsTotal)), "\n")