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

Unified Diff: tools/lua/gradients.lua

Issue 2150663002: Add verb field in scraping scripts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | tools/lua/gradients.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/gradients.lua
diff --git a/tools/lua/gradients.lua b/tools/lua/gradients.lua
index 4e24c9694aae8129a8fdef268f87616fbaac7d07..2a14ff637b990b821993994a19345e0b915d8769 100644
--- a/tools/lua/gradients.lua
+++ b/tools/lua/gradients.lua
@@ -7,6 +7,7 @@ function LuaDoubleNearlyEqual(a, b)
return math.abs(a-b) <= LuaDoubleNearlyZero
end
+verbs = {}
gradients = {}
i = 1
@@ -18,6 +19,12 @@ function sk_scrape_accumulate(t)
if s then
local g = s:asAGradient()
if g then
+ if verbs[t.verb] then
+ verbs[t.verb] = verbs[t.verb] + 1
+ else
+ verbs[t.verb] = 1
+ end
+
gradients[i] = {}
gradients[i].colorCount = g.colorCount
@@ -38,8 +45,10 @@ function sk_scrape_accumulate(t)
numHardStops = numHardStops + 1
end
end
- gradients[i].numHardStops = numHardStops;
+ gradients[i].numHardStops = numHardStops
+ gradients[i].verb = t.verb
+
gradients[i].positions = {}
for j = 1, g.colorCount, 1 do
gradients[i].positions[j] = g.positions[j]
@@ -61,12 +70,13 @@ function sk_scrape_summarize()
end
end
- io.write(string.format("%d %s %s %d %d %s\n",
+ io.write(string.format("%d %s %s %d %d %s %s\n",
v.colorCount,
v.type,
v.tile,
tonumber(v.isEvenlySpaced and 1 or 0),
v.numHardStops,
+ v.verb,
pos))
end
end
« no previous file with comments | « no previous file | tools/lua/gradients.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698